add visual indicators of slider position during mouse move
This commit is contained in:
parent
872e3fadef
commit
271c1c72ed
|
@ -646,6 +646,78 @@ collections {
|
|||
rel2.to_x: "slider2";
|
||||
}
|
||||
}
|
||||
part { name: "outline"; type: RECT; mouse_events: 0;
|
||||
scale: 1;
|
||||
description { state: "default";
|
||||
color: 0 0 0 0;
|
||||
rel1.to: "elm.swallow.bar";
|
||||
rel1.offset: -1 -1;
|
||||
rel2.to: "elm.swallow.bar";
|
||||
rel2.offset: 1 1;
|
||||
visible: 0;
|
||||
}
|
||||
description { state: "active";
|
||||
inherit: "default";
|
||||
color: 0 0 0 192;
|
||||
visible: 1;
|
||||
}
|
||||
}
|
||||
part { name: "guide"; type: RECT; mouse_events: 0;
|
||||
scale: 1;
|
||||
clip_to: "guide_clip";
|
||||
dragable.confine: "elm.swallow.bar";
|
||||
description { state: "default";
|
||||
color: 0 0 255 255;
|
||||
rel1.to: "elm.swallow.bar";
|
||||
rel2.to_x: "guide.level";
|
||||
rel2.to_y: "elm.swallow.bar";
|
||||
}
|
||||
description { state: "paused";
|
||||
inherit: "default";
|
||||
color: 255 0 0 255;
|
||||
}
|
||||
}
|
||||
part { name: "guide_clip"; type: RECT; mouse_events: 0;
|
||||
scale: 1;
|
||||
description { state: "default";
|
||||
color: 0 0 0 0;
|
||||
visible: 0;
|
||||
}
|
||||
description { state: "active";
|
||||
color: 255 255 255 255;
|
||||
visible: 1;
|
||||
}
|
||||
}
|
||||
part { name: "guide.level"; type: SPACER;
|
||||
scale: 1;
|
||||
description { state: "default";
|
||||
rel1.to_x: "elm.swallow.bar";
|
||||
rel2.relative: 0 1;
|
||||
}
|
||||
}
|
||||
program { signal: "mouse,in"; source: "events";
|
||||
action: STATE_SET "active" 0.0;
|
||||
transition: LINEAR 0.2 CURRENT;
|
||||
target: "outline";
|
||||
target: "guide_clip";
|
||||
}
|
||||
program { signal: "mouse,out"; source: "events";
|
||||
action: STATE_SET "default" 0.0;
|
||||
transition: LINEAR 0.2 CURRENT;
|
||||
target: "outline";
|
||||
target: "guide_clip";
|
||||
target: "guide.level";
|
||||
}
|
||||
program { signal: "mouse,move"; source: "events";
|
||||
script {
|
||||
new x, y;
|
||||
|
||||
get_mouse(x, y);
|
||||
custom_state(PART:"guide.level", "default", 0.0);
|
||||
set_state_val(PART:"guide.level", STATE_REL2_OFFSET, x, 0);
|
||||
set_state(PART:"guide.level", "custom", 0.0);
|
||||
}
|
||||
}
|
||||
part { name: "level"; type: RECT; mouse_events: 0;
|
||||
scale: 1;
|
||||
description { state: "default";
|
||||
|
@ -670,11 +742,13 @@ collections {
|
|||
program { signal: "empc,state,playing"; source: "empc";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "level";
|
||||
target: "guide";
|
||||
transition: LINEAR 0.2 CURRENT;
|
||||
}
|
||||
program { signal: "empc,state,paused"; source: "empc";
|
||||
action: STATE_SET "paused" 0.0;
|
||||
target: "level";
|
||||
target: "guide";
|
||||
transition: LINEAR 0.2 CURRENT;
|
||||
}
|
||||
program { signal: "empc,state,stopped"; source: "empc";
|
||||
|
@ -692,13 +766,12 @@ collections {
|
|||
description { state: "default";
|
||||
}
|
||||
}
|
||||
part { name: "elm.dragable.slider"; type: RECT;
|
||||
part { name: "elm.dragable.slider"; type: SPACER;
|
||||
scale: 1;
|
||||
dragable.x: 1 1 0;
|
||||
dragable.y: 0 0 0;
|
||||
dragable.confine: "elm.swallow.bar";
|
||||
description { state: "default";
|
||||
color: 0 0 0 0;
|
||||
min: 16 16;
|
||||
max: 16 16;
|
||||
fixed: 1 1;
|
||||
|
@ -708,13 +781,12 @@ collections {
|
|||
rel2.to_x: "elm.swallow.bar";
|
||||
}
|
||||
}
|
||||
part { name: "slider1"; type: RECT;
|
||||
part { name: "slider1"; type: SPACER;
|
||||
scale: 1;
|
||||
dragable.x: 1 1 0;
|
||||
dragable.y: 0 0 0;
|
||||
dragable.confine: "elm.swallow.bar";
|
||||
description { state: "default";
|
||||
color: 0 0 0 0;
|
||||
min: 16 16;
|
||||
max: 16 16;
|
||||
fixed: 1 1;
|
||||
|
@ -724,13 +796,12 @@ collections {
|
|||
rel2.to_x: "elm.swallow.bar";
|
||||
}
|
||||
}
|
||||
part { name: "slider2"; type: RECT;
|
||||
part { name: "slider2"; type: SPACER;
|
||||
scale: 1;
|
||||
dragable.x: 1 1 0;
|
||||
dragable.y: 0 0 0;
|
||||
dragable.confine: "elm.swallow.bar";
|
||||
description { state: "default";
|
||||
color: 0 0 0 0;
|
||||
min: 16 16;
|
||||
max: 16 16;
|
||||
fixed: 1 1;
|
||||
|
@ -740,17 +811,6 @@ collections {
|
|||
rel2.to_x: "elm.swallow.bar";
|
||||
}
|
||||
}
|
||||
part { name: "slideevent"; type: RECT; repeat_events: 1;
|
||||
scale: 1;
|
||||
ignore_flags: ON_HOLD;
|
||||
dragable.events: "elm.dragable.slider";
|
||||
description { state: "default";
|
||||
fixed: 1 1;
|
||||
rel1.to: "elm.dragable.slider";
|
||||
rel2.to: "elm.dragable.slider";
|
||||
color: 0 0 0 0;
|
||||
}
|
||||
}
|
||||
program { name: "update";
|
||||
action: STATE_SET "slide" 0.0;
|
||||
target: "level.sizer";
|
||||
|
@ -768,6 +828,12 @@ collections {
|
|||
}
|
||||
after: "update";
|
||||
}
|
||||
part { name: "events"; type: RECT; repeat_events: 1;
|
||||
scale: 1;
|
||||
description { state: "default";
|
||||
color: 0 0 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue