}
script {
public cur_state;
+ public focused;
}
parts {
part {
signal: SIG_SET_PLAY;
source: "";
script {
+ new state;
+ state = get_int(focused);
+
+ if (state == STATE_NORMAL) {
+ set_state(PART:"bg", "default", 0.0);
+ set_state(PART:"color", "default", 0.0);
+ } else {
+ set_state(PART:"bg", "selected", 0.0);
+ set_state(PART:"color", "selected", 0.0);
+ }
+
set_int(cur_state, STATE_PLAY);
- set_state(PART:"bg", "default", 0.0);
- set_state(PART:"color", "default", 0.0);
}
}
program {
signal: SIG_SET_PAUSE;
source: "";
script {
+ new state;
+ state = get_int(focused);
+
+ if (state == STATE_NORMAL) {
+ set_state(PART:"bg", "default_pause", 0.0);
+ set_state(PART:"color", "default_pause", 0.0);
+ } else {
+ set_state(PART:"bg", "selected_pause", 0.0);
+ set_state(PART:"color", "selected_pause", 0.0);
+ }
+
set_int(cur_state, STATE_PAUSE);
- set_state(PART:"bg", "default_pause", 0.0);
- set_state(PART:"color", "default_pause", 0.0);
}
}
program {
run_program(PROGRAM:"focused,play");
else
run_program(PROGRAM:"focused,pause");
+
+ set_int(focused, STATE_FOCUSED);
}
}
program {
run_program(PROGRAM:"unfocused,play");
else
run_program(PROGRAM:"unfocused,pause");
+
+ set_int(focused, STATE_NORMAL);
}
}
program {
}
script {
public cur_state;
+ public focused;
}
parts {
part {
signal: SIG_SET_PLAY;
source: "";
script {
+ new state;
+ state = get_int(focused);
+
+ if (state == STATE_NORMAL) {
+ set_state(PART:"bg", "default", 0.0);
+ set_state(PART:"color", "default", 0.0);
+ } else {
+ set_state(PART:"bg", "selected", 0.0);
+ set_state(PART:"color", "selected", 0.0);
+ }
+
set_int(cur_state, STATE_PLAY);
- set_state(PART:"bg", "default", 0.0);
- set_state(PART:"color", "default", 0.0);
}
}
program {
signal: SIG_SET_PAUSE;
source: "";
script {
+ new state;
+ state = get_int(focused);
+
+ if (state == STATE_NORMAL) {
+ set_state(PART:"bg", "default_pause", 0.0);
+ set_state(PART:"color", "default_pause", 0.0);
+ } else {
+ set_state(PART:"bg", "selected_pause", 0.0);
+ set_state(PART:"color", "selected_pause", 0.0);
+ }
+
set_int(cur_state, STATE_PAUSE);
- set_state(PART:"bg", "default_pause", 0.0);
- set_state(PART:"color", "default_pause", 0.0);
}
}
program {
run_program(PROGRAM:"focused,play");
else
run_program(PROGRAM:"focused,pause");
+
+ set_int(focused, STATE_FOCUSED);
}
}
program {
run_program(PROGRAM:"unfocused,play");
else
run_program(PROGRAM:"unfocused,pause");
+
+ set_int(focused, STATE_NORMAL);
}
}
program {