|
1
|
var xx = argument[0];
|
|
2
|
var yy = argument[1];
|
|
3
|
var str = scr_replace_buttons_pcscr_replace_buttons_pc
var str = argument0;
if (global.osflavor <= 2)
{
str = string_replace_all(str, "\*Z", "[Z]");
str = string_replace_all(str, "\*X", "[X]");
str = string_replace_all(str, "\*C", "[C]");
str = string_replace_all(str, "\*A", );
str = string_replace_all(str, "\*D", );
}
return str; (argument[2]);
|
|
4
|
var icon_scale = 1;
|
|
5
|
if (argument_count >= 4)
|
|
6
|
icon_scale = argument[3];
|
|
7
|
var i = string_pos("\*", str);
|
|
8
|
while (i != 0)
|
|
9
|
{
|
|
10
|
if (i > 1)
|
|
11
|
{
|
|
12
|
var s = substr(str, 1, i - 1);
|
|
13
|
draw_text(xx, yy, s);
|
|
14
|
xx += round(string_width(s));
|
|
15
|
}
|
|
16
|
var ch = string_char_at(str, i + 2);
|
|
17
|
var sprite = scr_getbuttonspritescr_getbuttonsprite
var control = argument0;
var type = argument1;
if (control == "A")
{
if (os_type == os_ps4)
return button_ps4_dpad_l;
if (os_type == os_psvita)
return button_vita_dpad_l;
return noone;
}
if (control == "D")
{
if (os_type == os_ps4)
return button_ps4_dpad_r;
if (os_type == os_psvita)
return button_vita_dpad_r;
return noone;
}
var button = -4;
if (control == "Z")
button = global.button0;
if (control == "X")
button = global.button1;
if (control == "C")
button = global.button2;
if (button == gp_face1)
{
if (os_type == os_ps4)
{
if (type == 1)
return buttonL_ps4_cross;
return button_ps4_cross;
}
if (os_type == os_psvita)
{
if (type == 1)
return buttonL_vita_cross;
return button_vita_cross;
}
}
if (button == gp_face2)
{
if (os_type == os_ps4)
{
if (type == 1)
return buttonL_ps4_circle;
return button_ps4_circle;
}
if (os_type == os_psvita)
{
if (type == 1)
return buttonL_vita_circle;
return button_vita_circle;
}
}
if (button == gp_face3)
{
if (os_type == os_ps4)
{
if (type == 1)
return buttonL_ps4_square;
return button_ps4_square;
}
if (os_type == os_psvita)
{
if (type == 1)
return buttonL_vita_square;
return button_vita_square;
}
}
if (button == gp_face4)
{
if (os_type == os_ps4)
{
if (type == 1)
return buttonL_ps4_triangle;
return button_ps4_triangle;
}
if (os_type == os_psvita)
{
if (type == 1)
return buttonL_vita_triangle;
return button_vita_triangle;
}
}
if (button == gp_shoulderl)
{
if (os_type == os_ps4)
{
if (type == 1)
return buttonL_ps4_l1;
return button_ps4_l1;
}
if (os_type == os_psvita)
{
if (type == 1)
return buttonL_vita_l;
return button_vita_l;
}
}
if (button == gp_shoulderlb)
... (ch, 0);
|
|
18
|
if (sprite != -4)
|
|
19
|
{
|
|
20
|
draw_sprite_ext(sprite, 0, xx, yy, icon_scale, icon_scale, 0, c_white, 1);
|
|
21
|
xx += ((sprite_get_width(sprite) + 1) * icon_scale);
|
|
22
|
}
|
|
23
|
str = substr(str, i + 3);
|
|
24
|
i = string_pos("\*", str);
|
|
25
|
}
|
|
26
|
if (string_length(str) > 0)
|
|
27
|
draw_text(xx, yy, str);
|