TH - efl pointer

This commit is contained in:
Carsten Haitzler 2021-03-15 17:31:22 +00:00
parent f94c972f18
commit 29269c8774
1 changed files with 21 additions and 69 deletions

View File

@ -1,14 +1,9 @@
group { name: "efl/pointer"; data.item: "version" "123";
images {
image: "pointer.png" COMP;
image: "pointer_glow.png" COMP;
}
group { name: "efl/pointer";
data.item: "version" "123";
images.image: "pointer.png" COMP;
parts {
part {
name: "base";
mouse_events: 0;
description {
state: "default" 0.0;
part { name: "base"; mouse_events: 0;
description { state: "default" 0.0;
aspect: 1.0 1.0;
min: 32 32;
/* force a specific aspect ratio so
@ -18,87 +13,46 @@ group { name: "efl/pointer"; data.item: "version" "123";
/* both axes control aspect - thus it
* will be WITHIN the bounds the axes
* of thre part describe */
image {
normal: "pointer.png";
}
image.normal: "pointer.png";
}
description { state: "clicked" 0.0;
inherit: "default" 0.0;
color: 51 153 255 255;
}
}
part { name: "glow";
description { state: "default" 0.0;
image.normal: "pointer_glow.png";
color: 255 255 255 0;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255;
}
description { state: "faded" 0.0;
inherit: "default" 0.0;
color: 255 255 255 128;
}
}
part {
name: "efl.hotspot";
part { name: "efl.hotspot"; type: SWALLOW;
/* this is a "fake" swallow part
* that is used by e to determine
* the pointer hotspot - or where
* the actual mouse events get
* reported from on the cursor */
type: SWALLOW;
description {
state: "default" 0.0;
description { state: "default" 0.0;
visible: 0;
fixed: 1 1;
rel1 {
/* the hotspot will scale with the cursor here */
to: "base";
relative: 0.1875 0.1875;
relative: (5/32) (5/32);
offset: 0 0;
}
rel2 {
to: "base";
relative: 0.1875 0.1875;
relative: (5/32) (5/32);
offset: 0 0;
}
}
}
}
programs {
program {
signal: "efl,action,mouse,down"; source: "efl";
action: STATE_SET "visible" 0.0;
target: "glow";
program { signal: "efl,action,mouse,down"; source: "efl";
action: STATE_SET "clicked" 0.0;
target: "base";
after: "fade";
}
program { name: "fade";
action: STATE_SET "default" 0.0;
transition: SINUSOIDAL 0.5;
target: "glow";
}
program { name: "pulse";
signal: "e,state,mouse,idle"; source: "e";
in: 10.0 0.0;
action: STATE_SET "faded" 0.0;
transition: SINUSOIDAL 0.25;
target: "glow";
after: "pulse2";
}
program { name: "pulse2";
action: STATE_SET "default" 0.0;
transition: SINUSOIDAL 0.5;
target: "glow";
after: "pulse";
}
program {
signal: "efl,action,mouse,move"; source: "efl";
action: STATE_SET "default" 0.0;
target: "glow";
after: "stop2";
}
program { name: "stop2";
action: ACTION_STOP;
target: "pulse";
target: "pulse2";
target: "base";
}
}
}
@ -106,13 +60,11 @@ group { name: "efl/pointer"; data.item: "version" "123";
group { name: "efl/pointer:bottom_right_corner";
inherit: "efl/pointer";
data.item: "version" "123";
images.image: "mini_box_glow.png" COMP;
parts {
part { name: "box";
insert_after: "glow";
part { name: "box"; type: RECT;
insert_after: "base";
description { state: "default" 0.0;
image.normal: "mini_box_glow.png";
image.border: 7 7 7 7;
color: 51 153 255 192;
rel1.relative: 0.3 0.3;
rel2.relative: 0.7 0.7;
}