|
1
|
_parent = -4;
|
|
2
|
_susie = -4;
|
|
3
|
_menu_state = UnknownEnum.Value_0;
|
|
4
|
_stats = -4;
|
|
5
|
_input_enabled = false;
|
|
6
|
_confirm_buffer = 3;
|
|
7
|
_cancel_buffer = 3;
|
|
8
|
_columns = [];
|
|
9
|
_columns_index = 0;
|
|
10
|
_row_index = 0;
|
|
11
|
_description = -4;
|
|
12
|
_bg_alpha = 0;
|
|
13
|
_logo_alpha = 0;
|
|
14
|
_logo_x = camerax() + 280;
|
|
15
|
_header_text = stringsetloc(Made by Lancer Industries"Made by Lancer Industries", "obj_ch5_LW07_thrashfit_menu_slash_Create_0_gml_34_0" );
|
|
16
|
_header_text_x = camerax() + 280;
|
|
17
|
_header_text_alpha = 0;
|
|
18
|
_subheader_text = stringsetloc((Which Was Made Up Slightly Earlier)"(Which Was Made Up Slightly Earlier)", "obj_ch5_LW07_thrashfit_menu_slash_Create_0_gml_38_0" );
|
|
19
|
_subheader_text_x = camerax() + 280;
|
|
20
|
_subheader_text_alpha = 0;
|
|
21
|
_confirm_text = "";
|
|
22
|
_confirm_options = [];
|
|
23
|
_confirm_options_index = 0;
|
|
24
|
_clean_up = false;
|
|
25
|
|
|
26
|
init = function(arg0)
|
|
27
|
{
|
|
28
|
_parent = arg0;
|
|
29
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
var _id = self;
if (!is_struct(self))
_id = id;
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpcol()
{
if (argument_count < 6)
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
} ("_bg_alpha", _bg_alpha, 0.8, 20);
|
|
30
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
var _id = self;
if (!is_struct(self))
_id = id;
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpcol()
{
if (argument_count < 6)
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
} ("_logo_x", _logo_x, camerax() + (view_wport[0] / 2), 20);
|
|
31
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
var _id = self;
if (!is_struct(self))
_id = id;
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpcol()
{
if (argument_count < 6)
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
} ("_logo_alpha", _logo_alpha, 1, 20);
|
|
32
|
scr_script_delayedscr_script_delayed
function scr_script_delayed()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed);
__scriptdelay.script = argument[0];
__scriptdelay.alarm[0] = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function scr_script_delayed_until()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed_function);
__scriptdelay.script = argument[0];
__scriptdelay.condition = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function delay_function(arg0, arg1)
{
return scr_script_delayed(arg0, arg1);
} (scr_lerpvar, 50, "_header_text_x", _header_text_x, camerax() + (view_wport[0] / 2), 20);
|
|
33
|
scr_script_delayedscr_script_delayed
function scr_script_delayed()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed);
__scriptdelay.script = argument[0];
__scriptdelay.alarm[0] = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function scr_script_delayed_until()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed_function);
__scriptdelay.script = argument[0];
__scriptdelay.condition = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function delay_function(arg0, arg1)
{
return scr_script_delayed(arg0, arg1);
} (scr_lerpvar, 50, "_header_text_alpha", _header_text_alpha, 1, 20);
|
|
34
|
scr_script_delayedscr_script_delayed
function scr_script_delayed()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed);
__scriptdelay.script = argument[0];
__scriptdelay.alarm[0] = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function scr_script_delayed_until()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed_function);
__scriptdelay.script = argument[0];
__scriptdelay.condition = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function delay_function(arg0, arg1)
{
return scr_script_delayed(arg0, arg1);
} (scr_lerpvar, 110, "_subheader_text_x", _subheader_text_x, camerax() + (view_wport[0] / 2), 20);
|
|
35
|
scr_script_delayedscr_script_delayed
function scr_script_delayed()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed);
__scriptdelay.script = argument[0];
__scriptdelay.alarm[0] = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function scr_script_delayed_until()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed_function);
__scriptdelay.script = argument[0];
__scriptdelay.condition = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function delay_function(arg0, arg1)
{
return scr_script_delayed(arg0, arg1);
} (scr_lerpvar, 110, "_subheader_text_alpha", _subheader_text_alpha, 1, 20);
|
|
36
|
scr_script_delayedscr_script_delayed
function scr_script_delayed()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed);
__scriptdelay.script = argument[0];
__scriptdelay.alarm[0] = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function scr_script_delayed_until()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed_function);
__scriptdelay.script = argument[0];
__scriptdelay.condition = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function delay_function(arg0, arg1)
{
return scr_script_delayed(arg0, arg1);
} (scr_lerpvar, 180, "_header_text_x", camerax() + (view_wport[0] / 2), _header_text_x, 20);
|
|
37
|
scr_script_delayedscr_script_delayed
function scr_script_delayed()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed);
__scriptdelay.script = argument[0];
__scriptdelay.alarm[0] = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function scr_script_delayed_until()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed_function);
__scriptdelay.script = argument[0];
__scriptdelay.condition = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function delay_function(arg0, arg1)
{
return scr_script_delayed(arg0, arg1);
} (scr_lerpvar, 180, "_header_text_alpha", 1, 0, 20);
|
|
38
|
scr_script_delayedscr_script_delayed
function scr_script_delayed()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed);
__scriptdelay.script = argument[0];
__scriptdelay.alarm[0] = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function scr_script_delayed_until()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed_function);
__scriptdelay.script = argument[0];
__scriptdelay.condition = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function delay_function(arg0, arg1)
{
return scr_script_delayed(arg0, arg1);
} (scr_lerpvar, 180, "_subheader_text_x", camerax() + (view_wport[0] / 2), _subheader_text_x, 20);
|
|
39
|
scr_script_delayedscr_script_delayed
function scr_script_delayed()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed);
__scriptdelay.script = argument[0];
__scriptdelay.alarm[0] = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function scr_script_delayed_until()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed_function);
__scriptdelay.script = argument[0];
__scriptdelay.condition = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function delay_function(arg0, arg1)
{
return scr_script_delayed(arg0, arg1);
} (scr_lerpvar, 180, "_subheader_text_alpha", 1, 0, 20);
|
|
40
|
scr_script_delayedscr_script_delayed
function scr_script_delayed()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed);
__scriptdelay.script = argument[0];
__scriptdelay.alarm[0] = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function scr_script_delayed_until()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed_function);
__scriptdelay.script = argument[0];
__scriptdelay.condition = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
}
function delay_function(arg0, arg1)
{
return scr_script_delayed(arg0, arg1);
} (show_menu, 190);
|
|
41
|
};
|
|
42
|
|
|
43
|
enable_input = function()
|
|
44
|
{
|
|
45
|
_input_enabled = true;
|
|
46
|
};
|
|
47
|
|
|
48
|
disable_input = function()
|
|
49
|
{
|
|
50
|
_input_enabled = false;
|
|
51
|
};
|
|
52
|
|
|
53
|
get_current_option = function()
|
|
54
|
{
|
|
55
|
return _columns[_columns_index][_row_index][0];
|
|
56
|
};
|
|
57
|
|
|
58
|
has_outfit_part = function()
|
|
59
|
{
|
|
60
|
return array_length(_columns[_columns_index][_row_index]) > 1;
|
|
61
|
};
|
|
62
|
|
|
63
|
get_current_outfit_part = function()
|
|
64
|
{
|
|
65
|
return _columns[_columns_index][_row_index][1];
|
|
66
|
};
|
|
67
|
|
|
68
|
get_current_description = function()
|
|
69
|
{
|
|
70
|
return _columns[_columns_index][_row_index][2];
|
|
71
|
};
|
|
72
|
|
|
73
|
confirm = function(arg0)
|
|
74
|
{
|
|
75
|
snd_play(snd_select);
|
|
76
|
if (_menu_state == UnknownEnum.Value_1)
|
|
77
|
{
|
|
78
|
var option = get_current_option();
|
|
79
|
if (option.can_scroll())
|
|
80
|
{
|
|
81
|
_menu_state = UnknownEnum.Value_2;
|
|
82
|
disable_input();
|
|
83
|
highlight_option();
|
|
84
|
if (has_outfit_part())
|
|
85
|
{
|
|
86
|
var outfit_part = get_current_outfit_part();
|
|
87
|
outfit_part.enable();
|
|
88
|
var outfit_description = get_current_description();
|
|
89
|
outfit_description.enable();
|
|
90
|
}
|
|
91
|
option.enable_input();
|
|
92
|
option.enable_h_scroll();
|
|
93
|
hide_default_description();
|
|
94
|
reset_buffer();
|
|
95
|
}
|
|
96
|
else
|
|
97
|
{
|
|
98
|
disable_input();
|
|
99
|
show_confirm();
|
|
100
|
}
|
|
101
|
}
|
|
102
|
else if (_menu_state == UnknownEnum.Value_2)
|
|
103
|
{
|
|
104
|
cancel();
|
|
105
|
}
|
|
106
|
else if (_menu_state == UnknownEnum.Value_3)
|
|
107
|
{
|
|
108
|
if (_confirm_options_index == 0)
|
|
109
|
close_menu();
|
|
110
|
else
|
|
111
|
cancel();
|
|
112
|
}
|
|
113
|
};
|
|
114
|
|
|
115
|
cancel = function()
|
|
116
|
{
|
|
117
|
snd_play(snd_swing);
|
|
118
|
if (_menu_state == UnknownEnum.Value_2)
|
|
119
|
{
|
|
120
|
_menu_state = UnknownEnum.Value_1;
|
|
121
|
if (has_outfit_part())
|
|
122
|
{
|
|
123
|
var outfit_part = get_current_outfit_part();
|
|
124
|
outfit_part.disable();
|
|
125
|
}
|
|
126
|
highlight_option();
|
|
127
|
show_default_description();
|
|
128
|
enable_input();
|
|
129
|
enable_select();
|
|
130
|
reset_buffer();
|
|
131
|
}
|
|
132
|
else if (_menu_state == UnknownEnum.Value_3)
|
|
133
|
{
|
|
134
|
with (obj_ch5_LW07_thrashfit_menu_option)
|
|
135
|
clean_up();
|
|
136
|
with (obj_ch5_LW07_thrashfit_susie_part)
|
|
137
|
clean_up();
|
|
138
|
with (obj_ch5_LW07_thrashfit_description)
|
|
139
|
clean_up();
|
|
140
|
with (obj_ch5_LW07_thrashfit_stats)
|
|
141
|
clean_up();
|
|
142
|
hide_default_description();
|
|
143
|
_columns = [];
|
|
144
|
_columns_index = 0;
|
|
145
|
_row_index = 0;
|
|
146
|
show_menu();
|
|
147
|
}
|
|
148
|
};
|
|
149
|
|
|
150
|
clean_up = function()
|
|
151
|
{
|
|
152
|
_clean_up = true;
|
|
153
|
with (obj_ch5_LW07_thrashfit_menu_option)
|
|
154
|
clean_up();
|
|
155
|
with (obj_ch5_LW07_thrashfit_susie_part)
|
|
156
|
clean_up();
|
|
157
|
with (obj_ch5_LW07_thrashfit_description)
|
|
158
|
clean_up();
|
|
159
|
with (obj_ch5_LW07_thrashfit_stats)
|
|
160
|
clean_up();
|
|
161
|
hide_default_description();
|
|
162
|
instance_destroy();
|
|
163
|
exit;
|
|
164
|
};
|
|
165
|
|
|
166
|
show_default_description = function()
|
|
167
|
{
|
|
168
|
if (_description != -4)
|
|
169
|
exit;
|
|
170
|
global.typer = 36;
|
|
171
|
var default_text = stringsetsubloc("*Select w`/ ~1.&*Change w`/ ~2&*or ~3.", scr_get_input_namescr_get_input_name
function scr_get_input_name(arg0)
{
var _control = "[?]";
if (global.is_console || obj_gamecontroller.gamepad_active)
{
_control = global.input_g[arg0];
if (_control == gp_padr)
return "\\*D ";
if (_control == gp_padl)
return "\\*A ";
if (_control == gp_padu)
return "\\*W ";
if (_control == gp_padd)
return "\\*S ";
if (_control == global.button0)
return "\\*Z ";
if (_control == global.button1)
return "\\*X ";
if (_control == global.button2)
return "\\*C ";
}
var left_bracket = (global.lang == "en") ? "[" : "[";
var right_bracket = (global.lang == "en") ? "]" : "]";
_control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket;
if (!is_string(_control))
_control = "[?]";
else
return _control;
} (4), scr_get_input_namescr_get_input_name
function scr_get_input_name(arg0)
{
var _control = "[?]";
if (global.is_console || obj_gamecontroller.gamepad_active)
{
_control = global.input_g[arg0];
if (_control == gp_padr)
return "\\*D ";
if (_control == gp_padl)
return "\\*A ";
if (_control == gp_padu)
return "\\*W ";
if (_control == gp_padd)
return "\\*S ";
if (_control == global.button0)
return "\\*Z ";
if (_control == global.button1)
return "\\*X ";
if (_control == global.button2)
return "\\*C ";
}
var left_bracket = (global.lang == "en") ? "[" : "[";
var right_bracket = (global.lang == "en") ? "]" : "]";
_control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket;
if (!is_string(_control))
_control = "[?]";
else
return _control;
} (1), scr_get_input_namescr_get_input_name
function scr_get_input_name(arg0)
{
var _control = "[?]";
if (global.is_console || obj_gamecontroller.gamepad_active)
{
_control = global.input_g[arg0];
if (_control == gp_padr)
return "\\*D ";
if (_control == gp_padl)
return "\\*A ";
if (_control == gp_padu)
return "\\*W ";
if (_control == gp_padd)
return "\\*S ";
if (_control == global.button0)
return "\\*Z ";
if (_control == global.button1)
return "\\*X ";
if (_control == global.button2)
return "\\*C ";
}
var left_bracket = (global.lang == "en") ? "[" : "[";
var right_bracket = (global.lang == "en") ? "]" : "]";
_control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket;
if (!is_string(_control))
_control = "[?]";
else
return _control;
} (3), "obj_ch5_LW07_thrashfit_menu_slash_Create_0_gml_209_0");
|
|
172
|
if (global.gamepad_type == "N/A")
|
|
173
|
default_text = stringsetsubloc("Select w`/ ~1. Change w`/ ~2 or ~3.", scr_get_input_namescr_get_input_name
function scr_get_input_name(arg0)
{
var _control = "[?]";
if (global.is_console || obj_gamecontroller.gamepad_active)
{
_control = global.input_g[arg0];
if (_control == gp_padr)
return "\\*D ";
if (_control == gp_padl)
return "\\*A ";
if (_control == gp_padu)
return "\\*W ";
if (_control == gp_padd)
return "\\*S ";
if (_control == global.button0)
return "\\*Z ";
if (_control == global.button1)
return "\\*X ";
if (_control == global.button2)
return "\\*C ";
}
var left_bracket = (global.lang == "en") ? "[" : "[";
var right_bracket = (global.lang == "en") ? "]" : "]";
_control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket;
if (!is_string(_control))
_control = "[?]";
else
return _control;
} (4), scr_get_input_namescr_get_input_name
function scr_get_input_name(arg0)
{
var _control = "[?]";
if (global.is_console || obj_gamecontroller.gamepad_active)
{
_control = global.input_g[arg0];
if (_control == gp_padr)
return "\\*D ";
if (_control == gp_padl)
return "\\*A ";
if (_control == gp_padu)
return "\\*W ";
if (_control == gp_padd)
return "\\*S ";
if (_control == global.button0)
return "\\*Z ";
if (_control == global.button1)
return "\\*X ";
if (_control == global.button2)
return "\\*C ";
}
var left_bracket = (global.lang == "en") ? "[" : "[";
var right_bracket = (global.lang == "en") ? "]" : "]";
_control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket;
if (!is_string(_control))
_control = "[?]";
else
return _control;
} (1), scr_get_input_namescr_get_input_name
function scr_get_input_name(arg0)
{
var _control = "[?]";
if (global.is_console || obj_gamecontroller.gamepad_active)
{
_control = global.input_g[arg0];
if (_control == gp_padr)
return "\\*D ";
if (_control == gp_padl)
return "\\*A ";
if (_control == gp_padu)
return "\\*W ";
if (_control == gp_padd)
return "\\*S ";
if (_control == global.button0)
return "\\*Z ";
if (_control == global.button1)
return "\\*X ";
if (_control == global.button2)
return "\\*C ";
}
var left_bracket = (global.lang == "en") ? "[" : "[";
var right_bracket = (global.lang == "en") ? "]" : "]";
_control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket;
if (!is_string(_control))
_control = "[?]";
else
return _control;
} (3), "obj_ch5_LW07_thrashfit_menu_slash_Create_0_gml_213_0");
|
|
174
|
msgset(0, default_text);
|
|
175
|
var ja_offset = (global.lang == "ja") ? 9 : 0;
|
|
176
|
_description = instance_create(680 + ja_offset, 300, obj_writer);
|
|
177
|
_description.depth = depth - 10;
|
|
178
|
_description.autoaster = 0;
|
|
179
|
_description.drawaster = 0;
|
|
180
|
_description.charline = 14;
|
|
181
|
_description.hspace = (global.lang == "ja") ? 30 : 15;
|
|
182
|
_description.vspace = 40;
|
|
183
|
_description.rate = 1;
|
|
184
|
_description.preventcskip = 1;
|
|
185
|
_description.skippable = 0;
|
|
186
|
_description.disablebutton1 = 1;
|
|
187
|
};
|
|
188
|
|
|
189
|
hide_default_description = function()
|
|
190
|
{
|
|
191
|
with (_description)
|
|
192
|
instance_destroy();
|
|
193
|
_description = -4;
|
|
194
|
};
|
|
195
|
|
|
196
|
close_menu = function()
|
|
197
|
{
|
|
198
|
_parent.trigger_event("close_menu");
|
|
199
|
clean_up();
|
|
200
|
};
|
|
201
|
|
|
202
|
trigger_event = function(arg0, arg1 = [])
|
|
203
|
{
|
|
204
|
switch (arg0)
|
|
205
|
{
|
|
206
|
case "confirm":
|
|
207
|
confirm(arg1);
|
|
208
|
break;
|
|
209
|
case "cancel":
|
|
210
|
cancel(arg1);
|
|
211
|
break;
|
|
212
|
}
|
|
213
|
};
|
|
214
|
|
|
215
|
create_option = function(arg0, arg1, arg2, arg3)
|
|
216
|
{
|
|
217
|
var option = [arg0, arg1, arg2, arg3];
|
|
218
|
return option;
|
|
219
|
};
|
|
220
|
|
|
221
|
highlight_option = function()
|
|
222
|
{
|
|
223
|
for (var i = 0; i < array_length(_columns); i++)
|
|
224
|
{
|
|
225
|
for (var j = 0; j < array_length(_columns[i]); j++)
|
|
226
|
{
|
|
227
|
option = _columns[i][j][0];
|
|
228
|
option.unhighlight();
|
|
229
|
if (array_length(_columns[i][j]) > 1)
|
|
230
|
{
|
|
231
|
var outfit_part = _columns[i][j][1];
|
|
232
|
outfit_part.disable();
|
|
233
|
var outfit_description = _columns[i][j][2];
|
|
234
|
outfit_description.disable();
|
|
235
|
}
|
|
236
|
}
|
|
237
|
}
|
|
238
|
_row_index = clamp(_row_index, 0, array_length(_columns[_columns_index]) - 1);
|
|
239
|
var option = get_current_option();
|
|
240
|
option.highlight();
|
|
241
|
};
|
|
242
|
|
|
243
|
reset_buffer = function()
|
|
244
|
{
|
|
245
|
_confirm_buffer = 3;
|
|
246
|
_cancel_buffer = 3;
|
|
247
|
};
|
|
248
|
|
|
249
|
enable_select = function()
|
|
250
|
{
|
|
251
|
if (_menu_state == UnknownEnum.Value_1)
|
|
252
|
{
|
|
253
|
for (var i = 0; i < array_length(_columns); i++)
|
|
254
|
{
|
|
255
|
for (var j = 0; j < array_length(_columns[i]); j++)
|
|
256
|
{
|
|
257
|
option = _columns[i][j][0];
|
|
258
|
option.disable_select();
|
|
259
|
option.unhighlight();
|
|
260
|
if (array_length(_columns[i][j]) > 1)
|
|
261
|
{
|
|
262
|
var outfit_description = _columns[i][j][2];
|
|
263
|
outfit_description.disable();
|
|
264
|
}
|
|
265
|
}
|
|
266
|
}
|
|
267
|
_row_index = clamp(_row_index, 0, array_length(_columns[_columns_index]) - 1);
|
|
268
|
var option = get_current_option();
|
|
269
|
option.enable_select();
|
|
270
|
option.highlight();
|
|
271
|
}
|
|
272
|
else if (_menu_state == UnknownEnum.Value_3)
|
|
273
|
{
|
|
274
|
if (_clean_up)
|
|
275
|
exit;
|
|
276
|
for (var i = 0; i < array_length(_confirm_options); i++)
|
|
277
|
{
|
|
278
|
option = _confirm_options[i];
|
|
279
|
option.disable_select();
|
|
280
|
option.unhighlight();
|
|
281
|
}
|
|
282
|
var option = _confirm_options[_confirm_options_index];
|
|
283
|
option.enable_select();
|
|
284
|
option.highlight();
|
|
285
|
}
|
|
286
|
};
|
|
287
|
|
|
288
|
show_menu = function()
|
|
289
|
{
|
|
290
|
if (_menu_state == UnknownEnum.Value_1)
|
|
291
|
exit;
|
|
292
|
_menu_state = UnknownEnum.Value_1;
|
|
293
|
_stats = instance_create(0, 0, obj_ch5_LW07_thrashfit_stats);
|
|
294
|
_stats.depth = depth - 10;
|
|
295
|
_stats.init();
|
|
296
|
var options_left = [create_option(stringsetloc(HAIR"HAIR", "obj_ch5_LW07_thrashfit_menu_slash_Create_0_gml_346_0" ), 4335, UnknownEnum.Value_1421, 40), create_option(stringsetloc(SHIRT"SHIRT", "obj_ch5_LW07_thrashfit_menu_slash_Create_0_gml_347_0" ), 2109, UnknownEnum.Value_1422, 30), create_option(stringsetloc(PANT"PANT", "obj_ch5_LW07_thrashfit_menu_slash_Create_0_gml_348_0" ), 4240, UnknownEnum.Value_1423, 20)];
|
|
297
|
var options_right = [create_option(stringsetloc(HAT"HAT", "obj_ch5_LW07_thrashfit_menu_slash_Create_0_gml_352_0" ), 1727, UnknownEnum.Value_1424, 50), create_option(stringsetloc(SHO"SHO", "obj_ch5_LW07_thrashfit_menu_slash_Create_0_gml_353_0" ), 6556, UnknownEnum.Value_1425, 10)];
|
|
298
|
var options_y = cameray() + 300;
|
|
299
|
var options_line_height = 40;
|
|
300
|
for (var i = 0; i < array_length(options_left); i++)
|
|
301
|
{
|
|
302
|
var label = options_left[i][0];
|
|
303
|
var sprite = options_left[i][1];
|
|
304
|
var flag = options_left[i][2];
|
|
305
|
var depth_order = options_left[i][3];
|
|
306
|
var sprite_info = sprite_get_info(sprite);
|
|
307
|
var frames = sprite_info.num_subimages;
|
|
308
|
var option_names = [];
|
|
309
|
for (var j = 0; j < frames; j++)
|
|
310
|
option_names[array_length(option_names)] = "0" + string(j);
|
|
311
|
var new_option = instance_create(0, options_y + (i * options_line_height), obj_ch5_LW07_thrashfit_menu_option);
|
|
312
|
new_option.init(id, label, option_names, flag);
|
|
313
|
new_option.disable_input();
|
|
314
|
new_option.depth = depth - 10;
|
|
315
|
var new_part = instance_create(0, 0, obj_ch5_LW07_thrashfit_susie_part);
|
|
316
|
new_part.init(sprite, flag);
|
|
317
|
new_part.depth = depth - depth_order;
|
|
318
|
var new_description = instance_create(0, 0, obj_ch5_LW07_thrashfit_description);
|
|
319
|
new_description.depth = depth - 10;
|
|
320
|
new_description.init(id, flag);
|
|
321
|
_columns[0][array_length(_columns[0])] = [new_option, new_part, new_description];
|
|
322
|
}
|
|
323
|
for (var i = 0; i < array_length(options_right); i++)
|
|
324
|
{
|
|
325
|
var label = options_right[i][0];
|
|
326
|
var sprite = options_right[i][1];
|
|
327
|
var flag = options_right[i][2];
|
|
328
|
var depth_order = options_right[i][3];
|
|
329
|
var sprite_info = sprite_get_info(sprite);
|
|
330
|
var frames = sprite_info.num_subimages;
|
|
331
|
var option_names = [];
|
|
332
|
for (var j = 0; j < frames; j++)
|
|
333
|
option_names[array_length(option_names)] = "0" + string(j);
|
|
334
|
var new_option = instance_create(0, options_y + (i * options_line_height), obj_ch5_LW07_thrashfit_menu_option);
|
|
335
|
ja_offset = (global.lang == "ja") ? 16 : 0;
|
|
336
|
new_option.init(id, label, option_names, flag, 170 + ja_offset);
|
|
337
|
new_option.disable_input();
|
|
338
|
new_option.depth = depth - 10;
|
|
339
|
var new_part = instance_create(0, 0, obj_ch5_LW07_thrashfit_susie_part);
|
|
340
|
new_part.init(sprite, flag);
|
|
341
|
new_part.depth = depth - depth_order;
|
|
342
|
var new_description = instance_create(0, 0, obj_ch5_LW07_thrashfit_description);
|
|
343
|
new_description.depth = depth - 10;
|
|
344
|
new_description.init(id, flag);
|
|
345
|
_columns[1][array_length(_columns[1])] = [new_option, new_part, new_description];
|
|
346
|
}
|
|
347
|
var end_option = instance_create(0, options_y + (array_length(options_right) * options_line_height), obj_ch5_LW07_thrashfit_menu_option);
|
|
348
|
var ja_offset = (global.lang == "ja") ? 16 : 0;
|
|
349
|
end_option.init(id, stringsetloc(END"END", "obj_ch5_LW07_thrashfit_menu_slash_Create_0_gml_432_0" ), [], -1, 170 + ja_offset);
|
|
350
|
end_option.depth = depth - 10;
|
|
351
|
_columns[1][array_length(_columns[1])] = [end_option];
|
|
352
|
enable_select();
|
|
353
|
show_default_description();
|
|
354
|
enable_input();
|
|
355
|
};
|
|
356
|
|
|
357
|
show_confirm = function()
|
|
358
|
{
|
|
359
|
if (_menu_state == UnknownEnum.Value_3)
|
|
360
|
exit;
|
|
361
|
_menu_state = UnknownEnum.Value_3;
|
|
362
|
with (obj_ch5_LW07_thrashfit_menu_option)
|
|
363
|
clean_up();
|
|
364
|
with (obj_ch5_LW07_thrashfit_description)
|
|
365
|
clean_up();
|
|
366
|
hide_default_description();
|
|
367
|
_confirm_text = stringsetloc(This is Susie's outfit.#Is that OK?"This is Susie's outfit.#Is that OK?", "obj_ch5_LW07_thrashfit_menu_slash_Create_0_gml_42_0" );
|
|
368
|
if (scr_thrashfit_is_duck())
|
|
369
|
_confirm_text = stringsetloc(This outfit sucks ass.#Is that OK?"This outfit sucks ass.#Is that OK?", "obj_ch5_LW07_thrashfit_menu_slash_Create_0_gml_459_0" );
|
|
370
|
var yes_option = instance_create(0, cameray() + 380, obj_ch5_LW07_thrashfit_menu_option);
|
|
371
|
yes_option.init(id, stringsetloc(YES"YES", "obj_ch5_LW07_thrashfit_menu_slash_Create_0_gml_463_0" ), [], -1, 180);
|
|
372
|
yes_option.depth = depth - 10;
|
|
373
|
var no_option = instance_create(0, cameray() + 380, obj_ch5_LW07_thrashfit_menu_option);
|
|
374
|
no_option.init(id, stringsetloc(NO"NO", "obj_ch5_LW07_thrashfit_menu_slash_Create_0_gml_467_0" ), [], -1, 280);
|
|
375
|
no_option.depth = depth - 10;
|
|
376
|
_confirm_options = [yes_option, no_option];
|
|
377
|
_confirm_options_index = 0;
|
|
378
|
enable_select();
|
|
379
|
enable_input();
|
|
380
|
};
|
|
381
|
|
|
382
|
enum UnknownEnum
|
|
383
|
{
|
|
384
|
Value_0,
|
|
385
|
Value_1,
|
|
386
|
Value_2,
|
|
387
|
Value_3,
|
|
388
|
Value_1421 = 1421,
|
|
389
|
Value_1422,
|
|
390
|
Value_1423,
|
|
391
|
Value_1424,
|
|
392
|
Value_1425
|
|
393
|
}
|