sCat
0
-1
0
0
_menu
<undefined>
1
603
7
0
0
-1
2
self
0
0
1
///Initialize
event_inherited();
opt[1] = "Slot 1: ";
opt[2] = "Slot 2: ";
opt[3] = "Slot 3: ";
opt[4] = "Slot 4: ";
opt[5] = "Slot 5: ";
1
603
7
0
0
-1
2
self
0
0
1
///Activate options
if(menudepth == instance_number(_menu)) {
if(input_check_pressed(ACTION)) {
if(curOpt == 0) {
instance_destroy();
} else {
load(curOpt);
}
input_clear(ACTION);
}
}
1
603
7
0
0
-1
2
self
0
0
1
///Draw menu with values
if(menudepth == instance_number(_menu)) {
draw_set_alpha(1);
var value;
value[5] = "No data";
value[4] = "No data";
value[3] = "No data";
value[2] = "No data";
value[1] = "No data";
value[0] = "";
if(file_exists(working_directory + "/game")) {
ini_open(working_directory + "/game");
if(ini_key_exists('5', 't')) {
value[5] = format_time(ini_read_real('5', 't', 0));
}
if(ini_key_exists('4', 't')) {
value[4] = format_time(ini_read_real('4', 't', 0));
}
if(ini_key_exists('3', 't')) {
value[3] = format_time(ini_read_real('3', 't', 0));
}
if(ini_key_exists('2', 't')) {
value[2] = format_time(ini_read_real('2', 't', 0));
}
if(ini_key_exists('1', 't')) {
value[1] = format_time(ini_read_real('1', 't', 0));
}
}
draw_set_halign(fa_center);
draw_set_valign(fa_bottom);
draw_set_font(fMenu);
if(os_browser != browser_not_a_browser) draw_set_font(fMenuHTML5);
for(var i = 0; i < array_length_1d(opt); i++) {
if(i == curOpt) {
draw_sprite( sprite_index,
image_index,
window_get_width() / 2 - string_width(opt[i] + value[i]) / 2 - 40,
window_get_height() / 2 - (array_length_1d(opt) / 2) * 32 + i * 32);
draw_sprite( sprite_index,
image_index + 2,
window_get_width() / 2 + string_width(opt[i] + value[i]) / 2 + 8,
window_get_height() / 2 - (array_length_1d(opt) / 2) * 32 + i * 32);
}
draw_text( window_get_width() / 2,
window_get_height() / 2 - (array_length_1d(opt) / 2) * 32 + (i + 1) * 32,
opt[i] + value[i]);
}
draw_set_halign(fa_left);
draw_set_valign(fa_top);
}
0
0
0
0.5
0.100000001490116
0
0.100000001490116
0.100000001490116
0.200000002980232
-1
0
0,0
16,16