1 |
function scr_84_draw_menuscr_84_draw_menufunction scr_84_draw_menu(argument0, argument1, argument2, argument3, argument4, argument5, argument6) //gml_Script_scr_84_draw_menu
{
var array = argument0
var xx = argument1
var yy = argument2
var vspacing = argument3
var selection_indices = argument4
var func_depth = argument5
var menu_depth = argument6
var length = ds_list_size(array)
for (var i = 0; i < length; i += 3)
{
var ndx = i / 3
var type = ds_list_find_value(array, i)
var item = ds_list_find_value(array, (i + 1))
var name = ds_list_find_value(array, (i + 2))
var selected = false
var prefix = " "
if (ndx == selection_indices[func_depth])
selected = true
draw_set_colour(c_white)
if selected
{
draw_set_colour(c_yellow)
prefix = "> "
if (func_depth > global.chemg_max_depth)
{
global.chemg_max_depth = func_depth
global.chemg_cursor_y = yy
}
}
if (type == "[group]")
name = "[ " + name + "... ]"
scr_84_draw_text_outline(xx, yy, (prefix + name))
yy += vspacing
if (func_depth < menu_depth && ndx == selection_indices[func_depth])
yy = scr_84_draw_menu(item, (xx + 20), yy, vspacing, selection_indices, (func_depth + 1), menu_depth)
}
return yy;
} (argument0, argument1, argument2, argument3, argument4, argument5, argument6) //gml_Script_scr_84_draw_menu |
2 |
{ |
3 |
var array = argument0 |
4 |
var xx = argument1 |
5 |
var yy = argument2 |
6 |
var vspacing = argument3 |
7 |
var selection_indices = argument4 |
8 |
var func_depth = argument5 |
9 |
var menu_depth = argument6 |
10 |
var length = ds_list_size(array) |
11 |
for (var i = 0; i < length; i += 3) |
12 |
{ |
13 |
var ndx = i / 3 |
14 |
var type = ds_list_find_value(array, i) |
15 |
var item = ds_list_find_value(array, (i + 1)) |
16 |
var name = ds_list_find_value(array, (i + 2)) |
17 |
var selected = false |
18 |
var prefix = " " |
19 |
if (ndx == selection_indices[func_depth]) |
20 |
selected = true |
21 |
draw_set_colour(c_white) |
22 |
if selected |
23 |
{ |
24 |
draw_set_colour(c_yellow) |
25 |
prefix = "> " |
26 |
if (func_depth > global.chemg_max_depth) |
27 |
{ |
28 |
global.chemg_max_depth = func_depth |
29 |
global.chemg_cursor_y = yy |
30 |
} |
31 |
} |
32 |
if (type == "[group]") |
33 |
name = "[ " + name + "... ]" |
34 |
scr_84_draw_text_outlinescr_84_draw_text_outlinefunction scr_84_draw_text_outline(argument0, argument1, argument2) //gml_Script_scr_84_draw_text_outline
{
var xx = argument0
var yy = argument1
var str = argument2
var __txtcolor__ = draw_get_color()
draw_set_colour(c_black)
draw_text((xx - 1), (yy - 1), str)
draw_text((xx + 1), (yy - 1), str)
draw_text((xx - 1), (yy + 1), str)
draw_text((xx + 1), (yy + 1), str)
draw_set_colour(__txtcolor__)
draw_text(xx, yy, str)
} (xx, yy, (prefix + name)) |
35 |
yy += vspacing |
36 |
if (func_depth < menu_depth && ndx == selection_indices[func_depth]) |
37 |
yy = scr_84_draw_menuscr_84_draw_menufunction scr_84_draw_menu(argument0, argument1, argument2, argument3, argument4, argument5, argument6) //gml_Script_scr_84_draw_menu
{
var array = argument0
var xx = argument1
var yy = argument2
var vspacing = argument3
var selection_indices = argument4
var func_depth = argument5
var menu_depth = argument6
var length = ds_list_size(array)
for (var i = 0; i < length; i += 3)
{
var ndx = i / 3
var type = ds_list_find_value(array, i)
var item = ds_list_find_value(array, (i + 1))
var name = ds_list_find_value(array, (i + 2))
var selected = false
var prefix = " "
if (ndx == selection_indices[func_depth])
selected = true
draw_set_colour(c_white)
if selected
{
draw_set_colour(c_yellow)
prefix = "> "
if (func_depth > global.chemg_max_depth)
{
global.chemg_max_depth = func_depth
global.chemg_cursor_y = yy
}
}
if (type == "[group]")
name = "[ " + name + "... ]"
scr_84_draw_text_outline(xx, yy, (prefix + name))
yy += vspacing
if (func_depth < menu_depth && ndx == selection_indices[func_depth])
yy = scr_84_draw_menu(item, (xx + 20), yy, vspacing, selection_indices, (func_depth + 1), menu_depth)
}
return yy;
} (item, (xx + 20), yy, vspacing, selection_indices, (func_depth + 1), menu_depth) |
38 |
} |
39 |
return yy; |
40 |
} |