summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Atton <jonathan.atton@gmail.com>2010-11-17 19:08:43 +0000
committerJonathan Atton <jonathan.atton@gmail.com>2010-11-17 19:08:43 +0000
commit6e9f4df5ddf6fd51b53e4a64de69c12ba2182c5c (patch)
treeebce4b039b388a9b67a4918b3e2589c973eb14c8
parent0981b2eca3a2763ab99c7ff643d40bd669f7c6b1 (diff)
detour-elm : add focus and nouse hover on elm button
SVN revision: 54650
-rw-r--r--main.edc140
1 files changed, 78 insertions, 62 deletions
diff --git a/main.edc b/main.edc
index c64301d..4dec680 100644
--- a/main.edc
+++ b/main.edc
@@ -605,20 +605,15 @@ collections {
605 } 605 }
606 } 606 }
607 part { 607 part {
608 name: "focus_clip"; 608 name: "focus";
609 type: RECT;
610 mouse_events: 0; 609 mouse_events: 0;
611 description { 610 description {
612 state: "default" 0.0; 611 state: "default" 0.0;
612 image.normal: "images/button_im3.png";
613 image.border: 7 7 7 7;
613 color: 255 255 255 0; 614 color: 255 255 255 0;
614 rel1 { 615 rel1.offset: 5 4;
615 to: "enabled_button"; 616 rel2.offset: -6 -5;
616 offset: -1 0;
617 }
618 rel2 {
619 to: "enabled_button";
620 offset: 0 -1;
621 }
622 } 617 }
623 description { 618 description {
624 state: "visible" 0.0; 619 state: "visible" 0.0;
@@ -627,22 +622,20 @@ collections {
627 } 622 }
628 } 623 }
629 part { 624 part {
630 name: "focus"; 625 name: "mouse_hover";
631 mouse_events: 0; 626 mouse_events: 0;
632 clip_to: "focus_clip";
633 description { 627 description {
634 state: "default" 0.0; 628 state: "default" 0.0;
635 image.normal: "images/button_im3.png"; 629 image.normal: "images/button_im3.png";
636 image.border: 7 7 7 7; 630 image.border: 7 7 7 7;
637 rel1 { 631 color: 255 255 255 0;
638 to: "focus_clip"; 632 rel1.offset: 5 4;
639 } 633 rel2.offset: -6 -5;
640 rel2 { 634 }
641 to: "focus_clip"; 635 description {
642 } 636 state: "visible" 0.0;
643 fill { 637 inherit: "default" 0.0;
644 smooth: 1; 638 color: 255 255 255 100;
645 }
646 } 639 }
647 } 640 }
648 part { 641 part {
@@ -890,23 +883,38 @@ collections {
890 set_state(PART:"elm.text", "default", 0.0); 883 set_state(PART:"elm.text", "default", 0.0);
891 } 884 }
892 } 885 }
893 /*program { 886 program {
894 name: "focused"; 887 name: "focused";
895 signal: "e,state,focused"; 888 signal: "elm,action,focus";
896 source: "e"; 889 source: "elm";
897 action: STATE_SET "visible" 0.0; 890 action: STATE_SET "visible" 0.0;
898 transition: DECELERATE 0.5; 891 transition: DECELERATE 0.5;
899 target: "focus_clip"; 892 target: "focus";
900 } 893 }
901 program { 894 program {
902 name: "lose_focus"; 895 name: "unfocused";
903 signal: "e,state,unfocused"; 896 signal: "elm,action,unfocus";
904 source: "e"; 897 source: "elm";
905 action: STATE_SET "default" 0.0; 898 action: STATE_SET "default" 0.0;
906 transition: DECELERATE 0.5; 899 transition: DECELERATE 0.5;
907 target: "focus_clip"; 900 target: "focus";
901 }
902 program {
903 name: "mouse_in";
904 signal: "mouse,in";
905 source: "enabled_button";
906 action: STATE_SET "visible" 0.0;
907 transition: DECELERATE 0.2;
908 target: "mouse_hover";
909 }
910 program {
911 name: "mouse_out";
912 signal: "mouse,out";
913 source: "enabled_button";
914 action: STATE_SET "default" 0.0;
915 transition: DECELERATE 0.2;
916 target: "mouse_hover";
908 } 917 }
909 */
910 program { 918 program {
911 name: "button_clicked"; 919 name: "button_clicked";
912 signal: "mouse,down,1"; 920 signal: "mouse,down,1";
@@ -1059,20 +1067,15 @@ collections {
1059 } 1067 }
1060 } 1068 }
1061 part { 1069 part {
1062 name: "focus_clip"; 1070 name: "focus";
1063 type: RECT;
1064 mouse_events: 0; 1071 mouse_events: 0;
1065 description { 1072 description {
1066 state: "default" 0.0; 1073 state: "default" 0.0;
1074 image.normal: "images/button_im3.png";
1075 image.border: 7 7 7 7;
1067 color: 255 255 255 0; 1076 color: 255 255 255 0;
1068 rel1 { 1077 rel1.offset: 5 4;
1069 to: "enabled_button"; 1078 rel2.offset: -6 -5;
1070 offset: -1 0;
1071 }
1072 rel2 {
1073 to: "enabled_button";
1074 offset: 0 -1;
1075 }
1076 } 1079 }
1077 description { 1080 description {
1078 state: "visible" 0.0; 1081 state: "visible" 0.0;
@@ -1081,22 +1084,20 @@ collections {
1081 } 1084 }
1082 } 1085 }
1083 part { 1086 part {
1084 name: "focus"; 1087 name: "mouse_hover";
1085 mouse_events: 0; 1088 mouse_events: 0;
1086 clip_to: "focus_clip";
1087 description { 1089 description {
1088 state: "default" 0.0; 1090 state: "default" 0.0;
1089 image.normal: "images/button_im3.png"; 1091 image.normal: "images/button_im3.png";
1090 image.border: 7 7 7 7; 1092 image.border: 7 7 7 7;
1091 rel1 { 1093 color: 255 255 255 0;
1092 to: "focus_clip"; 1094 rel1.offset: 5 4;
1093 } 1095 rel2.offset: -6 -5;
1094 rel2 { 1096 }
1095 to: "focus_clip"; 1097 description {
1096 } 1098 state: "visible" 0.0;
1097 fill { 1099 inherit: "default" 0.0;
1098 smooth: 1; 1100 color: 255 255 255 100;
1099 }
1100 } 1101 }
1101 } 1102 }
1102 part { 1103 part {
@@ -1357,23 +1358,38 @@ collections {
1357 set_state(PART:"elm.text", "default", 0.0); 1358 set_state(PART:"elm.text", "default", 0.0);
1358 } 1359 }
1359 } 1360 }
1360 /*program { 1361 program {
1361 name: "focused"; 1362 name: "focused";
1362 signal: "e,state,focused"; 1363 signal: "elm,action,focus";
1363 source: "e"; 1364 source: "elm";
1364 action: STATE_SET "visible" 0.0; 1365 action: STATE_SET "visible" 0.0;
1365 transition: DECELERATE 0.5; 1366 transition: DECELERATE 0.5;
1366 target: "focus_clip"; 1367 target: "focus";
1367 } 1368 }
1368 program { 1369 program {
1369 name: "lose_focus"; 1370 name: "unfocused";
1370 signal: "e,state,unfocused"; 1371 signal: "elm,action,unfocus";
1371 source: "e"; 1372 source: "elm";
1372 action: STATE_SET "default" 0.0; 1373 action: STATE_SET "default" 0.0;
1373 transition: DECELERATE 0.5; 1374 transition: DECELERATE 0.5;
1374 target: "focus_clip"; 1375 target: "focus";
1376 }
1377 program {
1378 name: "mouse_in";
1379 signal: "mouse,in";
1380 source: "enabled_button";
1381 action: STATE_SET "visible" 0.0;
1382 transition: DECELERATE 0.2;
1383 target: "mouse_hover";
1384 }
1385 program {
1386 name: "mouse_out";
1387 signal: "mouse,out";
1388 source: "enabled_button";
1389 action: STATE_SET "default" 0.0;
1390 transition: DECELERATE 0.2;
1391 target: "mouse_hover";
1375 } 1392 }
1376 */
1377 program { 1393 program {
1378 name: "button_clicked"; 1394 name: "button_clicked";
1379 signal: "mouse,down,1"; 1395 signal: "mouse,down,1";
@@ -1466,7 +1482,7 @@ collections {
1466 action: STATE_SET "visible" 0.0; 1482 action: STATE_SET "visible" 0.0;
1467 target: "base"; 1483 target: "base";
1468 target: "enabled_button"; 1484 target: "enabled_button";
1469 transition: DECELERATE 0.5; 1485 transition: DECELERATE 0.2;
1470 } 1486 }
1471 program { 1487 program {
1472 name: "button_mouse_out"; 1488 name: "button_mouse_out";
@@ -1475,7 +1491,7 @@ collections {
1475 action: STATE_SET "default" 0.0; 1491 action: STATE_SET "default" 0.0;
1476 target: "base"; 1492 target: "base";
1477 target: "enabled_button"; 1493 target: "enabled_button";
1478 transition: DECELERATE 0.5; 1494 transition: DECELERATE 0.2;
1479 } 1495 }
1480 } 1496 }
1481 } 1497 }