1 |
var control = argument0; |
2 |
var type = argument1; |
3 |
if (control == "A") |
4 |
{ |
5 |
if (os_type == os_ps4) |
6 |
return button_ps4_dpad_l; |
7 |
if (os_type == os_psvita) |
8 |
return button_vita_dpad_l; |
9 |
return noone; |
10 |
} |
11 |
if (control == "D") |
12 |
{ |
13 |
if (os_type == os_ps4) |
14 |
return button_ps4_dpad_r; |
15 |
if (os_type == os_psvita) |
16 |
return button_vita_dpad_r; |
17 |
return noone; |
18 |
} |
19 |
var button = -4; |
20 |
if (control == "Z") |
21 |
button = global.button0; |
22 |
if (control == "X") |
23 |
button = global.button1; |
24 |
if (control == "C") |
25 |
button = global.button2; |
26 |
if (button == gp_face1) |
27 |
{ |
28 |
if (os_type == os_ps4) |
29 |
{ |
30 |
if (type == 1) |
31 |
return buttonL_ps4_cross; |
32 |
return button_ps4_cross; |
33 |
} |
34 |
if (os_type == os_psvita) |
35 |
{ |
36 |
if (type == 1) |
37 |
return buttonL_vita_cross; |
38 |
return button_vita_cross; |
39 |
} |
40 |
} |
41 |
if (button == gp_face2) |
42 |
{ |
43 |
if (os_type == os_ps4) |
44 |
{ |
45 |
if (type == 1) |
46 |
return buttonL_ps4_circle; |
47 |
return button_ps4_circle; |
48 |
} |
49 |
if (os_type == os_psvita) |
50 |
{ |
51 |
if (type == 1) |
52 |
return buttonL_vita_circle; |
53 |
return button_vita_circle; |
54 |
} |
55 |
} |
56 |
if (button == gp_face3) |
57 |
{ |
58 |
if (os_type == os_ps4) |
59 |
{ |
60 |
if (type == 1) |
61 |
return buttonL_ps4_square; |
62 |
return button_ps4_square; |
63 |
} |
64 |
if (os_type == os_psvita) |
65 |
{ |
66 |
if (type == 1) |
67 |
return buttonL_vita_square; |
68 |
return button_vita_square; |
69 |
} |
70 |
} |
71 |
if (button == gp_face4) |
72 |
{ |
73 |
if (os_type == os_ps4) |
74 |
{ |
75 |
if (type == 1) |
76 |
return buttonL_ps4_triangle; |
77 |
return button_ps4_triangle; |
78 |
} |
79 |
if (os_type == os_psvita) |
80 |
{ |
81 |
if (type == 1) |
82 |
return buttonL_vita_triangle; |
83 |
return button_vita_triangle; |
84 |
} |
85 |
} |
86 |
if (button == gp_shoulderl) |
87 |
{ |
88 |
if (os_type == os_ps4) |
89 |
{ |
90 |
if (type == 1) |
91 |
return buttonL_ps4_l1; |
92 |
return button_ps4_l1; |
93 |
} |
94 |
if (os_type == os_psvita) |
95 |
{ |
96 |
if (type == 1) |
97 |
return buttonL_vita_l; |
98 |
return button_vita_l; |
99 |
} |
100 |
} |
101 |
if (button == gp_shoulderlb) |
102 |
{ |
103 |
if (os_type == os_ps4) |
104 |
{ |
105 |
if (type == 1) |
106 |
return buttonL_ps4_l2; |
107 |
return button_ps4_l2; |
108 |
} |
109 |
} |
110 |
if (button == gp_shoulderr) |
111 |
{ |
112 |
if (os_type == os_ps4) |
113 |
{ |
114 |
if (type == 1) |
115 |
return buttonL_ps4_r1; |
116 |
return button_ps4_r1; |
117 |
} |
118 |
if (os_type == os_psvita) |
119 |
{ |
120 |
if (type == 1) |
121 |
return buttonL_vita_r; |
122 |
return button_vita_r; |
123 |
} |
124 |
} |
125 |
if (button == gp_shoulderrb) |
126 |
{ |
127 |
if (os_type == os_ps4) |
128 |
{ |
129 |
if (type == 1) |
130 |
return buttonL_ps4_r2; |
131 |
return button_ps4_r2; |
132 |
} |
133 |
} |
134 |
if (button == gp_stickl) |
135 |
{ |
136 |
if (os_type == os_ps4) |
137 |
{ |
138 |
if (type == 1) |
139 |
return buttonL_ps4_l3; |
140 |
return button_ps4_l3; |
141 |
} |
142 |
} |
143 |
if (button == gp_stickr) |
144 |
{ |
145 |
if (os_type == os_ps4) |
146 |
{ |
147 |
if (type == 1) |
148 |
return buttonL_ps4_r3; |
149 |
return button_ps4_r3; |
150 |
} |
151 |
} |
152 |
if (button == gp_select) |
153 |
{ |
154 |
if (os_type == os_ps4) |
155 |
{ |
156 |
if (type == 1) |
157 |
return buttonL_ps4_touchpad; |
158 |
return button_ps4_touchpad; |
159 |
} |
160 |
if (os_type == os_psvita) |
161 |
{ |
162 |
if (type == 1) |
163 |
return buttonL_vita_select; |
164 |
return button_vita_select; |
165 |
} |
166 |
} |
167 |
if (button == gp_start) |
168 |
{ |
169 |
if (os_type == os_ps4) |
170 |
{ |
171 |
if (type == 1) |
172 |
return buttonL_ps4_options; |
173 |
return button_ps4_options; |
174 |
} |
175 |
if (os_type == os_psvita) |
176 |
{ |
177 |
if (type == 1) |
178 |
return buttonL_vita_start; |
179 |
return button_vita_start; |
180 |
} |
181 |
} |
182 |
return noone; |