2012-06-26 15:36:12 -07:00
|
|
|
#define BUTTON_GROUP(_name) \
|
|
|
|
group { \
|
|
|
|
name: "elm/button/base/ephysics-test-"#_name; \
|
2012-07-04 15:06:07 -07:00
|
|
|
\
|
|
|
|
images { \
|
|
|
|
image: "bt_"##_name##".png" COMP; \
|
|
|
|
image: "bt_"##_name##"_pressed.png" COMP; \
|
|
|
|
} \
|
2012-06-26 15:36:12 -07:00
|
|
|
\
|
|
|
|
parts { \
|
|
|
|
\
|
|
|
|
part { \
|
|
|
|
name: "blocker"; \
|
|
|
|
type: RECT; \
|
|
|
|
mouse_events: 1; \
|
|
|
|
description { \
|
|
|
|
state: "default" 0.0; \
|
|
|
|
color: 255 255 255 0; \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
part { \
|
|
|
|
name: "base"; \
|
|
|
|
type: IMAGE; \
|
|
|
|
mouse_events: 0; \
|
|
|
|
description { \
|
|
|
|
state: "default" 0.0; \
|
|
|
|
min: 80 28; \
|
|
|
|
max: 80 28; \
|
|
|
|
aspect: 1 1; \
|
|
|
|
image.normal: "bt_"##_name##".png"; \
|
|
|
|
} \
|
|
|
|
description { \
|
|
|
|
state: "pressed" 0.0; \
|
|
|
|
inherit: "default" 0.0; \
|
|
|
|
image.normal: "bt_"##_name##"_pressed.png"; \
|
|
|
|
} \
|
|
|
|
description { \
|
|
|
|
state: "disabled" 0.0; \
|
|
|
|
inherit: "default" 0.0; \
|
|
|
|
color: 255 255 255 80; \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
part { \
|
|
|
|
name: "over"; \
|
|
|
|
type: RECT; \
|
|
|
|
mouse_events: 1; \
|
|
|
|
ignore_flags: ON_HOLD; \
|
|
|
|
description { \
|
|
|
|
state: "default" 0.0; \
|
|
|
|
color: 255 255 255 0; \
|
|
|
|
} \
|
|
|
|
description { \
|
|
|
|
state: "disabled" 0.0; \
|
|
|
|
inherit: "default" 0.0; \
|
|
|
|
visible: 0; \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
programs { \
|
|
|
|
\
|
|
|
|
program { \
|
|
|
|
name: "bt_click"; \
|
|
|
|
source: "ephysics_test"; \
|
|
|
|
signal: "click"; \
|
|
|
|
in: 0.2 0; \
|
|
|
|
action: STATE_SET "pressed" 0.0; \
|
|
|
|
target: "base"; \
|
|
|
|
after: "bt_click2"; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
program { \
|
|
|
|
name: "bt_click2"; \
|
|
|
|
in: 0.4 0; \
|
|
|
|
action: STATE_SET "default" 0.0; \
|
|
|
|
target: "base"; \
|
|
|
|
after: "bt_clicked"; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
program { \
|
|
|
|
name: "bt_clicked"; \
|
|
|
|
source: "over"; \
|
|
|
|
signal: "mouse,clicked,1"; \
|
|
|
|
action: SIGNAL_EMIT "elm,action,click" ""; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
program { \
|
|
|
|
name: "bt_pressed"; \
|
|
|
|
source: "over"; \
|
|
|
|
signal: "mouse,down,1"; \
|
|
|
|
action: STATE_SET "pressed" 0.0; \
|
|
|
|
target: "base"; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
program { \
|
|
|
|
name: "bt_unpressed"; \
|
|
|
|
source: "over"; \
|
|
|
|
signal: "mouse,up,1"; \
|
|
|
|
action: STATE_SET "default" 0.0; \
|
|
|
|
target: "base"; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
program { \
|
|
|
|
name: "disable"; \
|
|
|
|
source: "elm"; \
|
|
|
|
signal: "elm,state,disabled"; \
|
|
|
|
action: STATE_SET "disabled" 0.0; \
|
|
|
|
target: "base"; \
|
|
|
|
target: "over"; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
program { \
|
|
|
|
name: "enable"; \
|
|
|
|
source: "elm"; \
|
|
|
|
signal: "elm,state,enabled"; \
|
|
|
|
action: STATE_SET "default" 0.0; \
|
|
|
|
target: "base"; \
|
|
|
|
target: "over"; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
}
|
|
|
|
|
|
|
|
BUTTON_GROUP(jump)
|
2012-07-04 15:06:07 -07:00
|
|
|
BUTTON_GROUP(restart)
|
|
|
|
BUTTON_GROUP(shoot)
|
2012-07-05 15:53:40 -07:00
|
|
|
BUTTON_GROUP(stop)
|
2012-06-26 15:36:12 -07:00
|
|
|
|
|
|
|
#undef BUTTON_GROUP
|