#define STATE_PLAY 0
#define STATE_PAUSE 1
+#define STATE_EN 0
+#define STATE_DIS 1
+
group {
name: "elm/button/base/base_btn_menu";
data.item: "focus_highlight" "on";
}
group {
+ name: "elm/button/base/music_btn_shuffle";
+ data.item, "focus_highlight" "on";
+ images {
+ image: IMAGE_MUSIC_SHUFFLE_NORMAL COMP;
+ image: IMAGE_MUSIC_SHUFFLE_FOCUS COMP;
+ image: IMAGE_MUSIC_SHUFFLE_DIS_NORMAL COMP;
+ image: IMAGE_MUSIC_SHUFFLE_DIS_FOCUS COMP;
+ }
+ script {
+ public cur_state;
+ }
+ parts {
+ part {
+ name: "color";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ }
+ description {
+ state: "selected" 0.0;
+ color: COLOR_ITEM_FOCUS;
+ }
+ description {
+ state: "default_dis" 0.0;
+ }
+ description {
+ state: "selected_dis" 0.0;
+ color: COLOR_ITEM_FOCUS;
+ }
+ }
+ part {
+ name: "bg";
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 164 142;
+ image {
+ normal: IMAGE_MUSIC_SHUFFLE_NORMAL;
+ }
+ }
+ description {
+ state: "selected" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: IMAGE_MUSIC_SHUFFLE_FOCUS;
+ }
+ }
+ description {
+ state: "clicked" 0.0;
+ min: 82 71;
+ max: 82 71;
+ image {
+ normal: IMAGE_MUSIC_SHUFFLE_FOCUS;
+ }
+ }
+ description {
+ state: "default_dis" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: IMAGE_MUSIC_SHUFFLE_DIS_NORMAL;
+ }
+ }
+ description {
+ state: "selected_dis" 0.0;
+ inherit: "selected" 0.0;
+ image {
+ normal: IMAGE_MUSIC_SHUFFLE_DIS_FOCUS;
+ }
+ }
+ description {
+ state: "clicked_dis" 0.0;
+ inherit: "clicked" 0.0;
+ image {
+ normal: IMAGE_MUSIC_SHUFFLE_DIS_FOCUS;
+ }
+ }
+ }
+ }
+ programs {
+ program {
+ name: "load";
+ signal: "load";
+ source: "";
+ script {
+ set_int(cur_state, STATE_DIS);
+ set_state(PART:"bg", "default_dis", 0.0);
+ set_state(PART:"color", "default_dis", 0.0);
+ }
+ }
+ program {
+ name: SIG_SET_ENABLE;
+ signal: SIG_SET_ENABLE;
+ source: "";
+ script {
+ set_int(cur_state, STATE_EN);
+ set_state(PART:"bg", "default", 0.0);
+ set_state(PART:"color", "default", 0.0);
+ }
+ }
+ program {
+ name: SIG_SET_DISABLE;
+ signal: SIG_SET_DISABLE;
+ source: "";
+ script {
+ set_int(cur_state, STATE_DIS);
+ set_state(PART:"bg", "default_dis", 0.0);
+ set_state(PART:"color", "default_dis", 0.0);
+ }
+ }
+ program {
+ name: "button_clicked";
+ signal: "mouse,clicked,1";
+ source: "bg";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ program {
+ name: SIG_BTN_CLICKED;
+ signal: SIG_BTN_CLICKED;
+ source: "";
+ script {
+ new state;
+ state = get_int(cur_state);
+
+ if (state == STATE_EN) {
+ set_int(cur_state, STATE_DIS);
+ run_program(PROGRAM:"anim,clicked,start,dis");
+ } else {
+ set_int(cur_state, STATE_EN);
+ run_program(PROGRAM:"anim,clicked,start,en");
+ }
+ }
+ }
+ program {
+ name: "anim,clicked,start,en";
+ action: STATE_SET "clicked_dis" 0.0;
+ target: "bg";
+ transition: TRANSITION_CLICK;
+ after: "anim,clicked,set,en";
+ }
+ program {
+ name: "anim,clicked,set,en";
+ action: STATE_SET "clicked" 0.0;
+ target: "bg";
+ after: "anim,clicked,end,en";
+ }
+ program {
+ name: "anim,clicked,end,en";
+ action: STATE_SET "selected" 0.0;
+ target: "bg";
+ transition: TRANSITION_CLICK;
+ after: "emit,signal";
+ }
+ program {
+ name: "anim,clicked,start,dis";
+ action: STATE_SET "clicked" 0.0;
+ target: "bg";
+ transition: TRANSITION_CLICK;
+ after: "anim,clicked,set,dis";
+ }
+ program {
+ name: "anim,clicked,set,dis";
+ action: STATE_SET "clicked_dis" 0.0;
+ target: "bg";
+ after: "anim,clicked,end,dis";
+ }
+ program {
+ name: "anim,clicked,end,dis";
+ action: STATE_SET "selected_dis" 0.0;
+ target: "bg";
+ transition: TRANSITION_CLICK;
+ after: "emit,signal";
+ }
+ program {
+ name: "emit,signal";
+ action: SIGNAL_EMIT SIG_BTN_CALLBACK SRC_BTN_MUSIC_SHUFFLE;
+ }
+ program {
+ name: "focused";
+ signal: "elm,action,focus";
+ source: "elm";
+ script {
+ new state;
+ state = get_int(cur_state);
+
+ if (state == STATE_EN)
+ run_program(PROGRAM:"focused,en");
+ else
+ run_program(PROGRAM:"focused,dis");
+ }
+ }
+ program {
+ name: "unfocused";
+ signal: "elm,action,unfocus";
+ source: "elm";
+ script {
+ new state;
+ state = get_int(cur_state);
+
+ if (state == STATE_EN)
+ run_program(PROGRAM:"unfocused,en");
+ else
+ run_program(PROGRAM:"unfocused,dis");
+ }
+ }
+ program {
+ name: "focused,en";
+ action: STATE_SET "selected" 0.0;
+ target: "bg";
+ target: "color";
+ transition: TRANSITION_FOCUS;
+ }
+ program {
+ name: "focused,dis";
+ action: STATE_SET "selected_dis" 0.0;
+ target: "bg";
+ target: "color";
+ transition: TRANSITION_FOCUS;
+ }
+ program {
+ name: "unfocused,en";
+ action: STATE_SET "default" 0.0;
+ target: "bg";
+ target: "color";
+ transition: TRANSITION_FOCUS;
+ }
+ program {
+ name: "unfocused,dis";
+ action: STATE_SET "default_dis" 0.0;
+ target: "bg";
+ target: "color";
+ transition: TRANSITION_FOCUS;
+ }
+ }
+}
+
+group {
name: "elm/button/base/music_btn_play";
data.item, "focus_highlight" "on";
images {