-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[clientscript,clanwars_setup_smallbox_open].cs2
50 lines (50 loc) · 2.3 KB
/
[clientscript,clanwars_setup_smallbox_open].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
// 2877
[clientscript,clanwars_setup_smallbox_open](enum $enum0, component $component1, component $component2, int $comsubid3, component $component4, component $component5, component $component6)
sound_synth(interface_select1, 1, 0);
if_sethide(true, $component6);
~deltooltip_action($component6);
~xpdrops_setup_display_hoverdisable($component2);
if_sethide(false, $component4);
if_setonclick("clanwars_setup_smallbox_close(1, -1, $enum0, $component2, $comsubid3, $component4, $component6)", $component4);
def_int $int7 = if_getx($component2);
def_int $int8 = if_gety($component2);
def_component $layer9 = if_getlayer($component2);
while ($layer9 ! null) {
$int7, $int8 = calc($int7 + if_getx($layer9) - if_getscrollx($layer9)), calc($int8 + if_gety($layer9) - if_getscrolly($layer9));
$layer9 = if_getlayer($layer9);
}
def_int $int10 = calc(enum_getoutputcount($enum0) - 1);
def_int $int11 = 14;
if (~on_mobile = true) {
$int11 = 18;
}
if_setposition($int7, calc($int8 + if_getheight($component2)), ^setpos_abs_left, ^setpos_abs_top, $component5);
if_setsize(if_getwidth($component2), calc(2 + $int10 * $int11 + 2), ^setsize_abs, ^setsize_abs, $component5);
cc_deleteall($component5);
~thinbox($component5, 0);
~script2881;
if_sethide(false, $component1);
def_int $int12 = 0;
.cc_create($component1, ^iftype_rectangle, $int12);
$int12 = calc($int12 + 1);
.cc_setsize(0, $int11, ^setsize_minus, ^setsize_abs);
.cc_setfill(true);
.cc_setcolour(^white);
.cc_settrans(200);
.cc_sethide(true);
def_int $int13 = 0;
while ($int13 < $int10) {
cc_create($component1, ^iftype_text, $int12);
cc_setposition(0, calc($int13 * $int11), ^setpos_abs_centre, ^setpos_abs_top);
cc_setsize(0, $int11, ^setsize_minus, ^setsize_abs);
cc_setcolour(0xff891f);
cc_settextshadow(true);
cc_settextfont(p11_full);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_setop(1, "Select");
cc_setonmouserepeat("xpdrops_setup_display_dropdown_hover(true, event_com, event_comsubid, .cc_getid, 0xff891f)");
cc_setonmouseleave("xpdrops_setup_display_dropdown_hover(false, event_com, event_comsubid, .cc_getid, 0xff891f)");
cc_setonop("clanwars_setup_smallbox_close(event_opindex, $int13, $enum0, $component2, $comsubid3, $component4, $component6)");
cc_settext(enum(int, string, $enum0, $int13));
$int13, $int12 = calc($int13 + 1), calc($int12 + 1);
}