-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[clientscript,fairyrings_sort_update].cs2
151 lines (151 loc) · 5.48 KB
/
[clientscript,fairyrings_sort_update].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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// 402
[clientscript,fairyrings_sort_update](component $component0, component $component1, int $int2, component $component3, component $component4)
if ($int2 = 1) {
if (%varcint54 = 1 | %varcint54 = 0) {
%varcint54 = %varcint54;
} else {
%varcint54 = 0;
}
if (%varcint0 < 0) {
%varcint0 = 0;
}
~scrollbar_vertical($component1, $component0, "scrollbar_dragger_v2,3", "scrollbar_dragger_v2,0", "scrollbar_dragger_v2,1", "scrollbar_dragger_v2,2", "scrollbar_v2,0", "scrollbar_v2,1");
} else {
sound_synth(interface_select1, 1, 0);
if (%varcint54 = 1) {
%varcint54 = 0;
} else {
%varcint54 = 1;
}
}
def_component $component5 = null;
def_component $component6 = null;
def_component $component7 = null;
def_int $width8 = calc(if_getwidth($component0) - 20);
if ($width8 <= 0) {
$width8 = 143;
}
cc_deleteall($component0);
cc_deleteall($component4);
def_int $int9 = 17;
def_int $int10 = 0;
def_int $int11 = 0;
def_boolean $boolean12 = true;
while ($int11 < 4) {
$component5 = enum(int, component, enum_1297, $int11);
$component7 = enum(int, component, enum_1298, $int11);
$component6 = enum(int, component, enum_1299, $int11);
if ($component5 ! null & $component6 ! null & $component7 ! null) {
if (string_length(if_gettext($component5)) > 0) {
$int9 = calc(paraheight(if_gettext($component5), $width8, p12_full) * 12 + 5);
if_sethide(false, $component5);
if_sethide(false, $component7);
if_sethide(false, $component6);
if_setsize($width8, $int9, ^setsize_abs, ^setsize_abs, $component5);
if_setsize($width8, $int9, ^setsize_abs, ^setsize_abs, $component7);
if_setposition(20, $int10, ^setpos_abs_left, ^setpos_abs_top, $component5);
if_setposition(2, $int10, ^setpos_abs_left, ^setpos_abs_top, $component6);
if_setposition(20, $int10, ^setpos_abs_left, ^setpos_abs_top, $component7);
if_setopbase("<col=ff981f><if_gettext($component7)></col>", $component5);
if_setonmouseover("text_colour_swapper($component7, 0xff7f7f)", $component5);
if_setonmouseleave("text_colour_swapper($component7, 0xff3f3f)", $component5);
$boolean12 = false;
$int10 = calc($int10 + $int9 + 3);
} else {
if_sethide(true, $component5);
if_sethide(true, $component6);
if_sethide(true, $component7);
}
}
$int11 = calc($int11 + 1);
}
if ($boolean12 = false) {
$int10 = calc($int10 + 3);
}
if_sethide($boolean12, $component3);
if_setsize(0, $int10, ^setsize_minus, ^setsize_abs, $component4);
def_int $int13 = 0;
def_component $component14 = null;
def_component $componentarray0(64);
def_int $int15 = 0;
def_string $string0 = "";
while ($int13 < 64) {
$component14 = enum(int, component, enum_824, $int13);
if ($component14 ! null) {
$component6 = enum(component, component, enum_1296, $component14);
if (string_length(if_gettext($component14)) > 0) {
if_sethide(false, $component14);
if ($component6 ! null) {
if_sethide(false, $component6);
}
$componentarray0($int15) = $component14;
$int15 = calc($int15 + 1);
} else {
if_sethide(true, $component14);
if ($component6 ! null) {
if_sethide(true, $component6);
}
}
}
$int13 = calc($int13 + 1);
}
if ($int15 > 0) {
if (%varcint54 = 1) {
~quicksort_componenttext(componentarray0, 0, calc($int15 - 1));
} else {
~quicksort_componentenum(componentarray0, 0, calc($int15 - 1), enum_823);
}
}
$int13 = 0;
cc_deleteall($component0);
while ($int13 < $int15) {
$component6 = enum(component, component, enum_1296, $componentarray0($int13));
$string0 = enum(component, string, enum_823, $componentarray0($int13));
$int9 = calc(paraheight(if_gettext($componentarray0($int13)), $width8, p12_full) * 12 + 5);
if ($component6 ! null) {
if_setposition(2, $int10, ^setpos_abs_left, ^setpos_abs_top, $component6);
}
if_setsize($width8, $int9, ^setsize_abs, ^setsize_abs, $componentarray0($int13));
if_setposition(20, $int10, ^setpos_abs_left, ^setpos_abs_top, $componentarray0($int13));
cc_create($component0, ^iftype_text, $int13);
cc_setsize($width8, $int9, ^setsize_abs, ^setsize_abs);
cc_setposition(20, if_gety($componentarray0($int13)), ^setpos_abs_left, ^setpos_abs_top);
cc_settextfont(p12_full);
cc_setcolour(0xff3f3f);
cc_settextshadow(true);
cc_settextalign(^settextalign_left, ^settextalign_top, 0);
cc_settext($string0);
if_setopbase("<col=ff981f><$string0></col>", $componentarray0($int13));
if_setonmouseover("cc_colour_swapper($component0, cc_getid, 0xff7f7f)", $componentarray0($int13));
if_setonmouseleave("cc_colour_swapper($component0, cc_getid, 0xff3f3f)", $componentarray0($int13));
$int10 = calc($int10 + $int9 + 3);
$int13 = calc($int13 + 1);
}
$string0 = if_gettext(interface_381:139);
if (string_length($string0) > 0) {
if_sethide(false, interface_381:139);
$int9 = calc(paraheight($string0, $width8, p12_full) * 12 + 5);
if_setsize($width8, $int9, ^setsize_abs, ^setsize_abs, interface_381:139);
if_setposition(20, $int10, ^setpos_abs_left, ^setpos_abs_top, interface_381:139);
if_setcolour(0xff3f3f, interface_381:139);
if_setonmouseover("text_colour_swapper(event_com, 0xff7f7f)", interface_381:139);
if_setonmouseleave("text_colour_swapper(event_com, 0xff3f3f)", interface_381:139);
$int10 = calc($int10 + $int9 + 3);
} else {
if_sethide(true, interface_381:139);
}
if ($int10 > 0) {
$int10 = calc($int10 - 3);
}
$int9 = if_getheight($component0);
if ($int10 > $int9) {
if_setscrollsize(0, $int10, $component0);
$int9 = calc($int10 - $int9);
if (%varcint0 > $int9) {
%varcint0 = $int9;
}
} else {
if_setscrollsize(0, 0, $component0);
%varcint0 = 0;
}
~scrollbar_resize($component1, $component0, %varcint0);