Changeset View
Changeset View
Standalone View
Standalone View
src/examples/ephysics/themes/buttons.edc
- This file was added.
1 | #define BUTTON_GROUP(_name) \ | ||||
---|---|---|---|---|---|
2 | group { \ | ||||
3 | name: "elm/button/base/ephysics-test-"#_name; \ | ||||
4 | \ | ||||
5 | images { \ | ||||
6 | image: "bt_"##_name##".png" COMP; \ | ||||
7 | image: "bt_"##_name##"_pressed.png" COMP; \ | ||||
8 | } \ | ||||
9 | \ | ||||
10 | parts { \ | ||||
11 | \ | ||||
12 | part { \ | ||||
13 | name: "blocker"; \ | ||||
14 | type: RECT; \ | ||||
15 | mouse_events: 1; \ | ||||
16 | description { \ | ||||
17 | state: "default" 0.0; \ | ||||
18 | color: 255 255 255 0; \ | ||||
19 | } \ | ||||
20 | } \ | ||||
21 | \ | ||||
22 | part { \ | ||||
23 | name: "base"; \ | ||||
24 | type: IMAGE; \ | ||||
25 | mouse_events: 0; \ | ||||
26 | description { \ | ||||
27 | state: "default" 0.0; \ | ||||
28 | min: 80 28; \ | ||||
29 | max: 80 28; \ | ||||
30 | aspect: 1 1; \ | ||||
31 | image.normal: "bt_"##_name##".png"; \ | ||||
32 | } \ | ||||
33 | description { \ | ||||
34 | state: "pressed" 0.0; \ | ||||
35 | inherit: "default" 0.0; \ | ||||
36 | image.normal: "bt_"##_name##"_pressed.png"; \ | ||||
37 | } \ | ||||
38 | description { \ | ||||
39 | state: "disabled" 0.0; \ | ||||
40 | inherit: "default" 0.0; \ | ||||
41 | color: 255 255 255 80; \ | ||||
42 | } \ | ||||
43 | } \ | ||||
44 | \ | ||||
45 | part { \ | ||||
46 | name: "over"; \ | ||||
47 | type: RECT; \ | ||||
48 | mouse_events: 1; \ | ||||
49 | ignore_flags: ON_HOLD; \ | ||||
50 | description { \ | ||||
51 | state: "default" 0.0; \ | ||||
52 | color: 255 255 255 0; \ | ||||
53 | } \ | ||||
54 | description { \ | ||||
55 | state: "disabled" 0.0; \ | ||||
56 | inherit: "default" 0.0; \ | ||||
57 | visible: 0; \ | ||||
58 | } \ | ||||
59 | } \ | ||||
60 | \ | ||||
61 | } \ | ||||
62 | \ | ||||
63 | programs { \ | ||||
64 | \ | ||||
65 | program { \ | ||||
66 | name: "bt_click"; \ | ||||
67 | source: "ephysics_test"; \ | ||||
68 | signal: "click"; \ | ||||
69 | in: 0.2 0; \ | ||||
70 | action: STATE_SET "pressed" 0.0; \ | ||||
71 | target: "base"; \ | ||||
72 | after: "bt_click2"; \ | ||||
73 | } \ | ||||
74 | \ | ||||
75 | program { \ | ||||
76 | name: "bt_click2"; \ | ||||
77 | in: 0.4 0; \ | ||||
78 | action: STATE_SET "default" 0.0; \ | ||||
79 | target: "base"; \ | ||||
80 | after: "bt_clicked"; \ | ||||
81 | } \ | ||||
82 | \ | ||||
83 | program { \ | ||||
84 | name: "bt_clicked"; \ | ||||
85 | source: "over"; \ | ||||
86 | signal: "mouse,clicked,1"; \ | ||||
87 | action: SIGNAL_EMIT "elm,action,click" ""; \ | ||||
88 | } \ | ||||
89 | \ | ||||
90 | program { \ | ||||
91 | name: "bt_pressed"; \ | ||||
92 | source: "over"; \ | ||||
93 | signal: "mouse,down,1"; \ | ||||
94 | action: STATE_SET "pressed" 0.0; \ | ||||
95 | target: "base"; \ | ||||
96 | } \ | ||||
97 | \ | ||||
98 | program { \ | ||||
99 | name: "bt_unpressed"; \ | ||||
100 | source: "over"; \ | ||||
101 | signal: "mouse,up,1"; \ | ||||
102 | action: STATE_SET "default" 0.0; \ | ||||
103 | target: "base"; \ | ||||
104 | } \ | ||||
105 | \ | ||||
106 | program { \ | ||||
107 | name: "disable"; \ | ||||
108 | source: "elm"; \ | ||||
109 | signal: "elm,state,disabled"; \ | ||||
110 | action: STATE_SET "disabled" 0.0; \ | ||||
111 | target: "base"; \ | ||||
112 | target: "over"; \ | ||||
113 | } \ | ||||
114 | \ | ||||
115 | program { \ | ||||
116 | name: "enable"; \ | ||||
117 | source: "elm"; \ | ||||
118 | signal: "elm,state,enabled"; \ | ||||
119 | action: STATE_SET "default" 0.0; \ | ||||
120 | target: "base"; \ | ||||
121 | target: "over"; \ | ||||
122 | } \ | ||||
123 | \ | ||||
124 | } \ | ||||
125 | \ | ||||
126 | } | ||||
127 | | ||||
128 | BUTTON_GROUP(jump) | ||||
129 | BUTTON_GROUP(restart) | ||||
130 | BUTTON_GROUP(shoot) | ||||
131 | BUTTON_GROUP(stop) | ||||
132 | | ||||
133 | #undef BUTTON_GROUP |