From 6c754eac11174331a8a01d8409e45e94a35d5177 Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Thu, 20 Aug 2015 15:14:43 +0900 Subject: mplayer: add repeat button Change-Id: I7aa9b2f9b98f4a0a0626daecfc2d54396fe6a8c4 Signed-off-by: Minkyu Kang --- res/edc/images/btn_music_contr_one_mode_nor.png | Bin 1175 -> 2113 bytes res/edc/images/btn_music_contr_one_mode_sel.png | Bin 0 -> 2052 bytes res/edc/images/btn_music_contr_repeat_dis.png | Bin 0 -> 2041 bytes res/edc/images/btn_music_contr_repeat_dis_foc.png | Bin 0 -> 1979 bytes res/edc/images/btn_music_contr_repeat_foc.png | Bin 1058 -> 3866 bytes res/edc/images/btn_music_contr_repeat_nor.png | Bin 1110 -> 3896 bytes res/edc/widgets/button.edc | 292 ++++++++++++++++++++++ 7 files changed, 292 insertions(+) create mode 100644 res/edc/images/btn_music_contr_one_mode_sel.png create mode 100644 res/edc/images/btn_music_contr_repeat_dis.png create mode 100644 res/edc/images/btn_music_contr_repeat_dis_foc.png (limited to 'res') diff --git a/res/edc/images/btn_music_contr_one_mode_nor.png b/res/edc/images/btn_music_contr_one_mode_nor.png index 1342b25..9b409ac 100644 Binary files a/res/edc/images/btn_music_contr_one_mode_nor.png and b/res/edc/images/btn_music_contr_one_mode_nor.png differ diff --git a/res/edc/images/btn_music_contr_one_mode_sel.png b/res/edc/images/btn_music_contr_one_mode_sel.png new file mode 100644 index 0000000..20c21ba Binary files /dev/null and b/res/edc/images/btn_music_contr_one_mode_sel.png differ diff --git a/res/edc/images/btn_music_contr_repeat_dis.png b/res/edc/images/btn_music_contr_repeat_dis.png new file mode 100644 index 0000000..2b5a277 Binary files /dev/null and b/res/edc/images/btn_music_contr_repeat_dis.png differ diff --git a/res/edc/images/btn_music_contr_repeat_dis_foc.png b/res/edc/images/btn_music_contr_repeat_dis_foc.png new file mode 100644 index 0000000..c4c0c24 Binary files /dev/null and b/res/edc/images/btn_music_contr_repeat_dis_foc.png differ diff --git a/res/edc/images/btn_music_contr_repeat_foc.png b/res/edc/images/btn_music_contr_repeat_foc.png index e01d911..41acbe5 100644 Binary files a/res/edc/images/btn_music_contr_repeat_foc.png and b/res/edc/images/btn_music_contr_repeat_foc.png differ diff --git a/res/edc/images/btn_music_contr_repeat_nor.png b/res/edc/images/btn_music_contr_repeat_nor.png index d638a75..00092ce 100644 Binary files a/res/edc/images/btn_music_contr_repeat_nor.png and b/res/edc/images/btn_music_contr_repeat_nor.png differ diff --git a/res/edc/widgets/button.edc b/res/edc/widgets/button.edc index c6734a4..e8a039b 100644 --- a/res/edc/widgets/button.edc +++ b/res/edc/widgets/button.edc @@ -28,6 +28,10 @@ #define STATE_EN 0 #define STATE_DIS 1 +#define STATE_ALL 0 +#define STATE_ONE 1 +#define STATE_NONE 2 + group { name: "elm/button/base/base_btn_menu"; data.item: "focus_highlight" "on"; @@ -1492,6 +1496,294 @@ group { } } +group { + name: "elm/button/base/music_btn_repeat"; + data.item, "focus_highlight" "on"; + images { + image: IMAGE_MUSIC_REPEAT_NORMAL COMP; + image: IMAGE_MUSIC_REPEAT_FOCUS COMP; + image: IMAGE_MUSIC_REPEAT_DIS_NORMAL COMP; + image: IMAGE_MUSIC_REPEAT_DIS_FOCUS COMP; + image: IMAGE_MUSIC_REPEAT_ONE_NORMAL COMP; + image: IMAGE_MUSIC_REPEAT_ONE_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_one" 0.0; + } + description { + state: "selected_one" 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_REPEAT_NORMAL; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + image { + normal: IMAGE_MUSIC_REPEAT_FOCUS; + } + } + description { + state: "clicked" 0.0; + min: 82 71; + max: 82 71; + image { + normal: IMAGE_MUSIC_REPEAT_FOCUS; + } + } + description { + state: "default_one" 0.0; + inherit: "default" 0.0; + image { + normal: IMAGE_MUSIC_REPEAT_ONE_NORMAL; + } + } + description { + state: "selected_one" 0.0; + inherit: "selected" 0.0; + image { + normal: IMAGE_MUSIC_REPEAT_ONE_FOCUS; + } + } + description { + state: "clicked_dis" 0.0; + inherit: "clicked" 0.0; + image { + normal: IMAGE_MUSIC_REPEAT_ONE_FOCUS; + } + } + description { + state: "default_dis" 0.0; + inherit: "default" 0.0; + image { + normal: IMAGE_MUSIC_REPEAT_DIS_NORMAL; + } + } + description { + state: "selected_dis" 0.0; + inherit: "selected" 0.0; + image { + normal: IMAGE_MUSIC_REPEAT_DIS_FOCUS; + } + } + description { + state: "clicked_dis" 0.0; + inherit: "clicked" 0.0; + image { + normal: IMAGE_MUSIC_REPEAT_DIS_FOCUS; + } + } + } + } + programs { + program { + name: "load"; + signal: "load"; + source: ""; + script { + set_int(cur_state, STATE_ALL); + set_state(PART:"bg", "default", 0.0); + set_state(PART:"color", "default", 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_ALL) { + set_int(cur_state, STATE_ONE); + run_program(PROGRAM:"anim,clicked,start,one"); + } else if (state == STATE_ONE) { + set_int(cur_state, STATE_NONE); + run_program(PROGRAM:"anim,clicked,start,dis"); + } else { + set_int(cur_state, STATE_ALL); + run_program(PROGRAM:"anim,clicked,start,all"); + } + } + } + program { + name: "anim,clicked,start,one"; + action: STATE_SET "clicked" 0.0; + target: "bg"; + transition: TRANSITION_CLICK; + after: "anim,clicked,set,one"; + } + program { + name: "anim,clicked,set,one"; + action: STATE_SET "clicked_one" 0.0; + target: "bg"; + after: "anim,clicked,end,one"; + } + program { + name: "anim,clicked,end,one"; + action: STATE_SET "selected_one" 0.0; + target: "bg"; + transition: TRANSITION_CLICK; + after: "emit,signal"; + } + program { + name: "anim,clicked,start,dis"; + action: STATE_SET "clicked_one" 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: "anim,clicked,start,all"; + action: STATE_SET "clicked_dis" 0.0; + target: "bg"; + transition: TRANSITION_CLICK; + after: "anim,clicked,set,all"; + } + program { + name: "anim,clicked,set,all"; + action: STATE_SET "clicked" 0.0; + target: "bg"; + after: "anim,clicked,end,all"; + } + program { + name: "anim,clicked,end,all"; + action: STATE_SET "selected" 0.0; + target: "bg"; + transition: TRANSITION_CLICK; + after: "emit,signal"; + } + program { + name: "emit,signal"; + action: SIGNAL_EMIT SIG_BTN_CALLBACK SRC_BTN_MUSIC_REPEAT; + } + program { + name: "focused"; + signal: "elm,action,focus"; + source: "elm"; + script { + new state; + state = get_int(cur_state); + + if (state == STATE_ALL) + run_program(PROGRAM:"focused,all"); + else if (state == STATE_ONE) + run_program(PROGRAM:"focused,one"); + 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_ALL) + run_program(PROGRAM:"unfocused,all"); + else if (state == STATE_ONE) + run_program(PROGRAM:"unfocused,one"); + else + run_program(PROGRAM:"unfocused,dis"); + } + } + program { + name: "focused,all"; + action: STATE_SET "selected" 0.0; + target: "bg"; + target: "color"; + transition: TRANSITION_FOCUS; + } + program { + name: "focused,one"; + action: STATE_SET "selected_one" 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,all"; + action: STATE_SET "default" 0.0; + target: "bg"; + target: "color"; + transition: TRANSITION_FOCUS; + } + program { + name: "unfocused,one"; + action: STATE_SET "default_one" 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/base_btn_recent"; data.item, "focus_highlight" "on"; -- cgit v1.2.3