alias: "elm/slider/horizontal/indicator/disabled";
alias: "elm/slider/vertical/indicator/default";
alias: "elm/slider/vertical/indicator/disabled";
+ alias: "elm/slider/horizontal/indicator/touchanddrag";
images {
image: "00_slider_handle.png" COMP;
image: "00_slider_handle_dim.png" COMP;
part { name: "button_events";
type: RECT;
mouse_events: 1;
+ scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
min: SLIDER_INDICATOR_WIDTH_INC SLIDER_INDICATOR_HEIGHT_INC;
}
}
+ group { name: "elm/slider/horizontal/touchanddrag";
+ images {
+ image: "00_winset_list_progress_bg.png" COMP;
+ image: "00_winset_list_progress_bar.png" COMP;
+ image: "00_slider_bar_press.png" COMP;
+ }
+ script {
+ public invert_on = 0;
+ public set_invert_on() {
+ set_state(PART:"level", "inverted", 0.0);
+ set_state(PART:"level2", "inverted", 0.0);
+ set_int(invert_on, 1);
+ }
+ public set_invert_off() {
+ set_state(PART:"level", "default", 0.0);
+ set_state(PART:"level2", "default", 0.0);
+ set_int(invert_on, 0);
+ }
+ public thumb_down() {
+ if(get_int(invert_on) == 0)
+ set_state(PART:"level", "pressed", 0.0);
+ else if(get_int(invert_on) == 1)
+ set_state(PART:"level2", "pressed", 0.0);
+ }
+ public thumb_up() {
+ if(get_int(invert_on) == 0)
+ set_state(PART:"level", "default", 0.0);
+ else if(get_int(invert_on) == 1)
+ set_state(PART:"level2", "inverted", 0.0);
+ }
+ }
+ parts {
+ part { name: "base";
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: SLIDER_BASE_MIN_WIDTH_INC SLIDER_BASE_HEIGHT_INC;
+ max: 99999 SLIDER_BASE_HEIGHT_INC;
+ rel1.to: "bg";
+ rel2.to: "bg";
+ image.normal: "00_winset_list_progress_bg.png";
+ image.border: 0 0 4 4;
+ image.border_scale: 1;
+ }
+ }
+ part { name: "level";
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1.to: "base";
+ rel2 {
+ to_y: "base";
+ to_x: "elm.dragable.slider";
+ relative: 0.5 1.0;
+ }
+ image.normal: "00_winset_list_progress_bar.png";
+ image.border: 0 0 4 4;
+ image.border_scale: 1;
+ }
+ description { state: "inverted" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ image.normal: "00_winset_list_progress_bar.png";
+ }
+ }
+ part { name: "level2";
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ visible: 0;
+ rel1 {
+ to_y: "base";
+ to_x: "elm.dragable.slider";
+ relative: 0.5 0.0;
+ }
+ rel2.to: "base";
+ image.normal: "00_winset_list_progress_bg.png";
+ image.border: 0 0 4 4;
+ image.border_scale: 1;
+ }
+ description { state: "inverted" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image.normal: "00_winset_list_progress_bg.png";
+ }
+ }
+ part { name: "bg";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ rel1.to: "elm.swallow.bar";
+ rel2.to: "elm.swallow.bar";
+ }
+ }
+ part { name: "elm.swallow.bar";
+ type: SWALLOW;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: SLIDER_SWALLOW_BAR_MIN_WIDTH_INC SLIDER_SWALLOW_BAR_HEIGHT_INC;
+ max: 99999 SLIDER_SWALLOW_BAR_HEIGHT_INC;
+ align: 1.0 0.5;
+ rel1 {
+ to_x: "bar_left_padding";
+ relative: 1.0 0.0;
+ }
+ rel2 {
+ to_x: "bar_right_padding";
+ relative: 0.0 1.0;
+ }
+ }
+ }
+ part {
+ name: "bar_left_padding";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ min: 10 0;
+ fixed: 1 1;
+ rel1 {
+ relative: 1.0 0.5;
+ to_x: "elm.text";
+ }
+ rel2 {
+ relative: 1.0 0.5;
+ to_x: "elm.text";
+ }
+ align: 0.0 0.5;
+ }
+ }
+ part {
+ name: "bar_right_padding";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ min: 10 0;
+ fixed: 1 1;
+ rel1 {
+ relative: 0.0 0.5;
+ to_x: "elm.units";
+ }
+ rel2 {
+ relative: 0.0 0.5;
+ to_x: "elm.units";
+ }
+ align: 1.0 0.5;
+ }
+ }
+ part { name: "elm.swallow.icon";
+ type: SWALLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ align: 0.0 0.5;
+ rel1 {
+ to_y: "elm.swallow.bar";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_y: "elm.swallow.bar";
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ aspect: 1.0 1.0;
+ aspect_preference: VERTICAL;
+ }
+ }
+ part { name: "elm.text";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ fixed: 1 1;
+ align: 0.0 0.5;
+ rel1.to_x: "elm.swallow.icon";
+ rel1.relative: 1.0 0.0;
+ rel2.to_x: "elm.swallow.icon";
+ color: SLIDER_UNITS_TEXT_COLOR_INC;
+ text {
+ font: "SLP:style=Medium";
+ size: SLIDER_UNITS_TEXT_SIZE_INC;
+ min: 0 0;
+ align: 0.0 0.5;
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ text.min: 1 1;
+ }
+ }
+ part { name: "elm.swallow.end";
+ type: SWALLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ align: 1.0 0.5;
+ rel1 {
+ relative: 1.0 0.0;
+ to_y: "elm.swallow.bar";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to_y: "elm.swallow.bar";
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ aspect: 1.0 1.0;
+ aspect_preference: VERTICAL;
+ }
+ }
+ part { name: "units";
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ rel1 {
+ to_x: "elm.units";
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ part { name: "elm.units";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ fixed: 1 1;
+ align: 1.0 0.5;
+ rel1.to_x: "elm.swallow.end";
+ rel2.relative: 0.0 1.0;
+ rel2.to_x: "elm.swallow.end";
+ color: SLIDER_UNITS_TEXT_COLOR_INC;
+ text {
+ font: "SLP:style=Bold";
+ size: SLIDER_UNITS_TEXT_SIZE_INC;
+ min: 0 0;
+ align: 0.0 0.5;
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ fixed: 1 1;
+ visible: 1;
+ text.min: 1 1;
+ }
+ }
+ part { name: "elm.dragable.slider";
+ type: GROUP;
+ source: "elm/slider/horizontal/indicator/touchanddrag";
+ mouse_events: 1;
+ scale: 1;
+ dragable {
+ x: 1 1 0;
+ y: 0 0 0;
+ confine: "bg";
+ }
+ description { state: "default" 0.0;
+ min: SLIDER_INDICATOR_WIDTH_INC SLIDER_INDICATOR_HEIGHT_INC;
+ fixed: 1 1;
+ rel1 {
+ relative: 0.5 0.0;
+ to_x: "bg";
+ }
+ rel2 {
+ relative: 0.5 1.0;
+ to_x: "bg";
+ }
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "disabler";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ min: 1 1;
+ color: SLIDER_DISABLER_PART_COLOR_INC;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ }
+ programs {
+ program { name: "text_show";
+ signal: "elm,state,text,visible";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "elm.text";
+ }
+ program { name: "text_hide";
+ signal: "elm,state,text,hidden";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.text";
+ }
+ program { name: "icon_show";
+ signal: "elm,state,icon,visible";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "elm.swallow.icon";
+ }
+ program { name: "icon_hide";
+ signal: "elm,state,icon,hidden";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.icon";
+ }
+ program { name: "end_show";
+ signal: "elm,state,end,visible";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "elm.swallow.end";
+ }
+ program { name: "end_hide";
+ signal: "elm,state,end,hidden";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.end";
+ }
+ program { name: "units_show";
+ signal: "elm,state,units,visible";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "elm.units";
+ target: "units";
+ }
+ program { name: "units_hide";
+ signal: "elm,state,units,hidden";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.units";
+ target: "units";
+ }
+ program { name: "invert_on";
+ signal: "elm,state,inverted,on";
+ source: "elm";
+ script {
+ set_invert_on();
+ }
+ }
+ program { name: "invert_off";
+ signal: "elm,state,inverted,off";
+ source: "elm";
+ script {
+ set_invert_off();
+ }
+ }
+ program { name: "val_show";
+ signal: "mouse,down,*";
+ source: "elm.dragable.slider";
+ script {
+ thumb_down();
+ }
+ }
+ program { name: "val_hide";
+ signal: "mouse,up,*";
+ source: "elm.dragable.slider";
+ script {
+ thumb_up();
+ }
+ }
+ program { name: "slider_disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "disabler";
+ }
+ program { name: "slider_enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "disabler";
+ }
+ }
+ }