-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[clientscript,settings_side_dropdown_open].cs2
72 lines (72 loc) · 3.17 KB
/
[clientscript,settings_side_dropdown_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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// 4568
[clientscript,settings_side_dropdown_open](component $component0, component $component1, component $component2, component $component3, component $component4, component $component5, component $layer6, enum $enum7, int $setting8)
sound_synth(interface_select1, 1, 0);
if_sethide(true, $component5);
~deltooltip_action($component5);
~xpdrops_setup_display_hoverdisable($component0);
if_sethide(false, $component2);
cc_deleteall($component1);
def_int $int9 = 15;
if (~on_mobile = true) {
$int9 = scale(8, 5, $int9);
}
.cc_create($component1, ^iftype_rectangle, 0);
.cc_setsize(0, calc($int9 + 2), ^setsize_minus, ^setsize_abs);
.cc_setfill(true);
.cc_setcolour(^white);
.cc_settrans(200);
.cc_sethide(true);
def_int $int10 = 0;
def_string $text0 = enum(int, string, $enum7, $int10);
def_int $count11 = 0;
def_int $count12 = enum_getoutputcount($enum7);
while ($count11 < $count12) {
cc_create($component1, ^iftype_text, calc($int10 + 1));
cc_setsize(0, $int9, ^setsize_minus, ^setsize_abs);
cc_setposition(0, calc($int10 * $int9), ^setpos_abs_centre, ^setpos_abs_top);
cc_setcolour(0xff981f);
cc_settextshadow(true);
cc_settextfont(p11_full);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settext($text0);
cc_setop(1, "Select");
cc_setonmouseover("settings_side_dropdown_hover(true, event_com, event_comsubid, .cc_getid)");
cc_setonmouseleave("settings_side_dropdown_hover(false, event_com, event_comsubid, .cc_getid)");
cc_setonop("settings_side_dropdown_op(event_op, event_com, event_comsubid, $component2, $component5, $component0, $enum7, $setting8)");
$int10 = calc($int10 + 1);
$count11 = calc($count11 + 1);
$text0 = enum(int, string, $enum7, $int10);
}
if_sethide(false, $component1);
def_int $int13 = calc($int10 * $int9);
def_int $height14 = calc($int13 + 4);
def_int $int15 = if_getx($component0);
def_int $int16 = if_gety($component0);
def_int $int17 = 0;
def_component $layer18 = if_getlayer($component0);
while ($layer18 ! $layer6) {
$int15, $int16 = calc($int15 + if_getx($layer18) - if_getscrollx($layer18)), calc($int16 + if_gety($layer18) - if_getscrolly($layer18));
$layer18 = if_getlayer($layer18);
}
if (~on_mobile = true & $setting8 ! 387) {
$int17 = ~max(0, calc($int16 + 20 - $height14));
} else {
$int17 = calc($int16 + if_getheight($component0) - 1);
}
if_setposition($int15, $int17, ^setpos_abs_left, ^setpos_abs_top, $component3);
def_int $height19 = calc(if_getheight($layer6) - $int17);
if (~on_mobile = true & $setting8 ! 387) {
$height19 = calc($int16 + 20 - $int17);
}
if ($height14 > $height19) {
if_setsize(if_getwidth($component0), $height19, ^setsize_abs, ^setsize_abs, $component3);
if_setscrollpos(0, 0, $component1);
if_setscrollsize(0, $int13, $component1);
} else {
if_setsize(if_getwidth($component0), $height14, ^setsize_abs, ^setsize_abs, $component3);
if_setscrollpos(0, 0, $component1);
if_setscrollsize(0, 0, $component1);
}
cc_deleteall($component4);
~scrollbar_vertical($component4, $component1, "scrollbar_dragger_v2,3", "scrollbar_dragger_v2,0", "scrollbar_dragger_v2,1", "scrollbar_dragger_v2,2", "scrollbar_v2,0", "scrollbar_v2,1");
if_setonclick("settings_side_dropdown_close($component2, $component5, $component0, $component1)", $component2);