-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[clientscript,ca_searchbar_keypress].cs2
62 lines (62 loc) · 2.39 KB
/
[clientscript,ca_searchbar_keypress].cs2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// 4798
[clientscript,ca_searchbar_keypress](int $key0, char $keychar1, component $component2, component $component3)
def_component $component4 = interface_716:10;
def_component $component5 = interface_716:13;
def_component $component6 = interface_716:19;
def_component $component7 = interface_716:14;
def_component $component8 = interface_716:11;
def_component $component9 = interface_716:12;
def_component $component10 = interface_716:16;
def_component $component11 = interface_716:17;
def_component $component12 = interface_716:18;
def_component $component13 = interface_716:20;
def_component $component14 = interface_716:9;
def_component $component15 = interface_716:15;
if (%varbit12884 = 0) {
return;
}
if ($key0 = ^key_control_left) {
%varcint528 = 1;
return;
}
if ($key0 = ^key_backspace & %varcint528 = 1) {
%varcstring527 = "";
~ca_searchbar_set_text($component3);
~ca_bosses_draw_list($component2, $component4, $component5, $component6, $component7, $component8, $component9, $component10, $component11, $component12, $component13, $component14, $component15);
return;
}
%varcint528 = 0;
if ($key0 = ^key_del) {
%varcstring527 = "";
~ca_searchbar_set_text($component3);
~ca_bosses_draw_list($component2, $component4, $component5, $component6, $component7, $component8, $component9, $component10, $component11, $component12, $component13, $component14, $component15);
return;
}
if ($key0 = ^key_return) {
if (~on_mobile = true) {
~keyboard_hide;
}
if (%varbit12884 = 1) {
~ca_boss_disable_search;
}
return;
}
def_string $string0 = %varcstring527;
def_int $length16 = string_length($string0);
if ($key0 = ^key_backspace) {
if ($length16 > 0) {
%varcstring527 = substring($string0, 0, calc($length16 - 1));
}
~ca_searchbar_set_text($component3);
~ca_bosses_draw_list($component2, $component4, $component5, $component6, $component7, $component8, $component9, $component10, $component11, $component12, $component13, $component14, $component15);
return;
}
if (char_isalphanumeric($keychar1) = false & string_indexof_char("-'", $keychar1) = -1) {
return;
}
if (string_length(append_char($string0, $keychar1)) > 50) {
return;
}
%varcstring527 = append_char($string0, $keychar1);
~ca_searchbar_set_text($component3);
~ca_bosses_draw_list($component2, $component4, $component5, $component6, $component7, $component8, $component9, $component10, $component11, $component12, $component13, $component14, $component15);