And allow the about page to be shown.

This commit is contained in:
Jaime Thomas
2009-02-19 04:40:53 +00:00
parent 5da712af65
commit 4486630d8e
6 changed files with 183 additions and 11 deletions

View File

@ -3,6 +3,20 @@ group {
name: "ecdb/window";
min: 640 390;
script {
public settings_time_id = 0;
const Float:show_timeout = 1.0;
public show_settings(val) {
run_program(PROGRAM:"settings,show");
run_program(PROGRAM:"about_icon,show");
if (get_int(settings_time_id) != 0) {
cancel_timer(get_int(settings_time_id));
}
return 0;
}
}
parts {
part {
name: "background";
@ -332,9 +346,141 @@ group {
}
}
}
part {
name: "settings_tab";
type: RECT;
mouse_events: 1;
scale: 1;
description {
state: "default" 0.0;
align: 1.0 0.0;
min: 24 24;
max: 24 24;
color: 0 0 0 0;
rel1 {
relative: 0.0 0.0;
offset: 0 0;
}
rel2 {
relative: 1.0 1.0;
offset: -1 -1;
}
}
description {
state: "visible" 0.0;
inherit: "default" 0.0;
min: 72 72;
max: 72 72;
color: 0 0 0 128;
}
}
part {
name: "about_icon";
type: IMAGE;
mouse_events: 1;
repeat_events: 1;
scale: 1;
description {
state: "default" 0.0;
min: 0 0;
max: 0 0;
color: 255 255 255 0;
rel1 {
to: "settings_tab";
relative: 0.0 0.0;
offset: 4 4;
}
rel2 {
to: "settings_tab";
relative: 1.0 1.0;
offset: -5 -5;
}
image {
normal: "icon_config.png";
}
}
description {
state: "visible" 0.0;
inherit: "default" 0.0;
min: 64 64;
max: 64 64;
color: 255 255 255 255;
}
}
}
programs {
program {
name: "settings,activate";
signal: "mouse,in";
source: "settings_tab";
script {
new i = timer(show_timeout, "show_settings", 0);
set_int(settings_time_id, i);
}
}
program {
name: "settings,deactivate";
signal: "mouse,out";
source: "settings_tab";
action: STATE_SET "default" 0.0;
target: "settings_tab";
transition: DECELERATE 0.3;
}
program {
name: "scripting,deactivate";
signal: "mouse,out";
source: "settings_tab";
script {
run_program(PROGRAM:"about_icon,hide");
if (get_int(settings_time_id) != 0) {
cancel_timer(get_int(settings_time_id));
set_int(settings_time_id, 0);
}
}
}
program {
name: "about_icon,hide";
action: STATE_SET "default" 0.0;
target: "about_icon";
transition: DECELERATE 0.3;
}
program {
name: "about_icon,show";
action: STATE_SET "visible" 0.0;
target: "about_icon";
transition: DECELERATE 0.3;
}
program {
name: "icon,clicked";
signal: "mouse,clicked,1";
source: "about_icon";
action: SIGNAL_EMIT "ecdb/about/show" "ecdb";
}
program {
name: "settings,show";
action: STATE_SET "visible" 0.0;
target: "settings_tab";
transition: DECELERATE 0.3;
}
program {
name: "filelist,visible";
signal: "ecdb,filelist,visible";