public isSpinup;
public isEnabled;
public isPressed;
- public isHovered;
public show() {
if (get_int(isEnabled) == 1) {
set_state(PART:"up_bt", "default", 0.0);
set_state(PART:"down_bt", "default", 0.0);
- if (get_int(isHovered) == 1) {
- if (get_int(isSpinup)) {
- set_state(PART:"up_bt", "hovered", 0.0);
- if (get_int(isPressed))
- set_state(PART:"up_bt", "pressed", 0.0);
- }
- else {
- set_state(PART:"down_bt", "hovered", 0.0);
- if (get_int(isPressed))
- set_state(PART:"down_bt", "pressed", 0.0);
- }
+ if (get_int(isSpinup)) {
+ if (get_int(isPressed))
+ set_state(PART:"up_bt", "pressed", 0.0);
+ }
+ else {
+ if (get_int(isPressed))
+ set_state(PART:"down_bt", "pressed", 0.0);
}
}
else {
inherit: "default" 0.0;
color: 255 255 255 150;
}
- description {
- state: "hovered" 0.0;
- inherit: "default" 0.0;
- image.normal: "widget/spinner/sp_up_hover.png";
- }
}
part {
inherit: "default" 0.0;
color: 255 255 255 150;
}
- description {
- state: "hovered" 0.0;
- inherit: "default" 0.0;
- image.normal: "widget/spinner/sp_down_hover.png";
- }
}
part {
}
}
program {
- name: "hovered";
- signal: "hovered";
- script {
- set_int(isHovered, 1);
- show();
- }
- }
- program {
name: "reset";
signal: "reset";
script {
set_int(isSpinup, 0);
set_int(isEnabled, 0);
set_int(isPressed, 0);
- set_int(isHovered, 0);
show();
}
}