forked from enlightenment/efl
50 lines
1.1 KiB
Plaintext
50 lines
1.1 KiB
Plaintext
|
#define SHADOW_ALPHA_ID 1
|
||
|
|
||
|
images {
|
||
|
image: "shadow-ball.png" COMP;
|
||
|
image: "shadow-cube.png" COMP;
|
||
|
}
|
||
|
|
||
|
#define SHADOW_GROUP(_name) \
|
||
|
group { \
|
||
|
name: #_name; \
|
||
|
\
|
||
|
script { \
|
||
|
public message(Msg_Type:type, id, ...) \
|
||
|
{ \
|
||
|
if ((type == MSG_FLOAT) && (id == SHADOW_ALPHA_ID)) \
|
||
|
{ \
|
||
|
new Float:shadow_alpha = getfarg(2); \
|
||
|
set_tween_state(PART:"shadow", shadow_alpha, "default", 0.0, \
|
||
|
"visible", 0.0); \
|
||
|
} \
|
||
|
} \
|
||
|
} \
|
||
|
\
|
||
|
parts { \
|
||
|
\
|
||
|
part { \
|
||
|
name: "shadow"; \
|
||
|
mouse_events: 0; \
|
||
|
type: IMAGE; \
|
||
|
description { \
|
||
|
state: "default" 0.0; \
|
||
|
image.normal: _name##".png"; \
|
||
|
color: 255 255 255 0; \
|
||
|
} \
|
||
|
description { \
|
||
|
state: "visible" 0.0; \
|
||
|
inherit: "default" 0.0; \
|
||
|
color: 255 255 255 255; \
|
||
|
} \
|
||
|
} \
|
||
|
} \
|
||
|
\
|
||
|
}
|
||
|
|
||
|
SHADOW_GROUP(shadow-ball)
|
||
|
SHADOW_GROUP(shadow-cube)
|
||
|
|
||
|
#undef SHADOW_GROUP
|
||
|
#undef SHADOW_ALPHA_ID
|