forked from enlightenment/efl
134 lines
3.3 KiB
Plaintext
134 lines
3.3 KiB
Plaintext
images {
|
|
image: "bt_jump.png" COMP;
|
|
image: "bt_jump_pressed.png" COMP;
|
|
image: "bt_restart.png" COMP;
|
|
image: "bt_restart_pressed.png" COMP;
|
|
}
|
|
|
|
#define BUTTON_GROUP(_name) \
|
|
group { \
|
|
name: "elm/button/base/ephysics-test-"#_name; \
|
|
\
|
|
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(restart)
|
|
BUTTON_GROUP(jump)
|
|
|
|
#undef BUTTON_GROUP
|