-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,league_info_draw_interface].cs2
258 lines (258 loc) · 10.5 KB
/
[proc,league_info_draw_interface].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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
// 3218
[proc,league_info_draw_interface](component $component0, component $component1, component $component2, component $component3, component $component4, component $component5, component $component6, component $component7, component $component8, component $component9, component $component10, int $int11, int $int12, int $comsubid13)
def_component $component14 = interface_654:1;
def_component $component15 = interface_654:3;
~script6109($component14, $component15);
cc_deleteall($component0);
cc_deleteall($component1);
cc_deleteall($component4);
cc_deleteall($component5);
cc_deleteall($component8);
cc_deleteall($component9);
def_struct $struct16 = enum(int, struct, enum_2670, %varbit10032);
if ($struct16 = null) {
return;
}
def_struct $struct17 = struct_param(enum(int, struct, enum_2670, %varbit10032), param_1434);
def_int $colour18 = 0xff981f;
if (%varbit10032 = 3) {
$colour18 = ^white;
} else {
$colour18 = struct_param($struct16, param_1027);
}
if (cc_find(interface_654:2, $comsubid13) = ^true) {
cc_setcolour($colour18);
} else {
~debug_mes("Couldn't find the frame.");
}
def_int $width19 = if_getwidth($component15);
if_setsize(calc($width19 / 2 + 3), 23, ^setsize_minus, ^setsize_abs, $component0);
if_setsize(calc($width19 / 2 + 3), 23, ^setsize_minus, ^setsize_abs, $component1);
switch_int (%varcint988) {
case 0 :
if_setposition(0, 45, ^setpos_proportion_centre, ^setpos_abs_top, interface_654:13);
if_setsize(calc($width19 / 2 + 3), 31, ^setsize_minus, ^setsize_minus, $component2);
if_setsize(calc($width19 / 2 + 3), 31, ^setsize_minus, ^setsize_minus, $component3);
case 1, 2 :
if_setposition(0, 49, ^setpos_proportion_centre, ^setpos_abs_top, interface_654:13);
if_setsize(calc($width19 / 2 + 3), 33, ^setsize_minus, ^setsize_minus, $component2);
if_setsize(calc($width19 / 2 + 3), 33, ^setsize_minus, ^setsize_minus, $component3);
case 3 :
if_setposition(0, 53, ^setpos_proportion_centre, ^setpos_abs_top, interface_654:13);
if_setsize(calc($width19 / 2 + 3), 35, ^setsize_minus, ^setsize_minus, $component2);
if_setsize(calc($width19 / 2 + 3), 35, ^setsize_minus, ^setsize_minus, $component3);
}
cc_create($component0, ^iftype_text, 0);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_top);
cc_setsize(0, 0, ^setsize_minus, ^setsize_minus);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_setcolour($colour18);
cc_settextshadow(true);
cc_settextfont(b12_full);
cc_settext("General League Information");
cc_create($component1, ^iftype_text, 0);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_top);
cc_setsize(0, 0, ^setsize_minus, ^setsize_minus);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_setcolour($colour18);
cc_settextshadow(true);
cc_settextfont(b12_full);
cc_settext("League Specific Information");
def_enum $enum20 = struct_param($struct17, param_886);
def_enum $enum21 = struct_param($struct17, param_887);
def_enum $enum22 = struct_param($struct16, param_888);
def_enum $enum23 = struct_param($struct16, param_889);
def_int $int24 = struct_param($struct16, param_872);
def_int $int25 = calc(1 + ($int24 - %varbit9535));
def_graphic $graphic26 = p12_full;
def_fontmetrics $fontmetrics27 = p12_full;
def_int $int28 = ~on_ios;
if (~on_mobile = true) {
$graphic26, $fontmetrics27 = p12_full, p12_full;
}
if ($int25 < 1) {
$int25 = 1;
}
def_int $int29 = 0;
def_int $int30 = 0;
def_int $x31 = 0;
def_int $height32 = 0;
def_int $height33 = 0;
def_int $int34 = 0;
def_string $string0 = "";
def_int $width35 = if_getwidth($component4);
def_int $width36 = if_getwidth($component5);
def_string $string1 = "<img=13> <~text_device("Click", "Tap")> to open the <~league_get_league_name> blog!<br>";
def_string $string2 = $string1;
def_int $int37 = calc(12 * paraheight($string2, calc($width35 - 10), p12_full) + 10);
def_string $url3 = "https://secure.runescape.com/m=news/leagues-v-raging-echoes-out-now?oldschool=1";
def_string $url4 = $url3;
def_int $int38 = calc(12 * paraheight($string1, calc($width36 - 10), p12_full) + 10);
def_int $int39 = $int38;
if ($int37 > $int38) {
$int39 = $int37;
}
$int39 = calc($int39 + 10);
if (~in_league_tutorial = 0) {
~leagues_menu_button($component8, $int30, $component9, $component10);
}
$int30 = 0;
~league_create_dropdown($component8, $component9, $component10, $int30, 0);
$int30 = 0;
while ($int29 < enum_getoutputcount($enum20)) {
if ($int29 = 0 & $int28 = 0) {
cc_create($component4, ^iftype_rectangle, $int30);
cc_setsize($width35, $int39, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(^white);
cc_setfill(true);
cc_settrans(235);
$int30 = calc($int30 + 1);
cc_create($component4, ^iftype_text, $int30);
cc_setposition(0, $height32, ^setpos_abs_left, ^setpos_abs_top);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settext($string2);
cc_settextfont(p12_full);
cc_settextshadow(true);
cc_setcolour($colour18);
cc_setsize(calc($width35 - 10), $int39, ^setsize_abs, ^setsize_abs);
if (~on_mobile = false) {
cc_setonmouseover("league_info_mouseover($component4, $int30)");
cc_setonmouseleave("league_info_mouseleave($component4, $int30, $colour18)");
}
cc_setop(1, "Open Link");
cc_setonop("league_blog_click($url4)");
$height32 = calc($height32 + $int39);
$int30 = calc($int30 + 1);
}
cc_create($component4, ^iftype_rectangle, $int30);
cc_setsize($width35, 20, ^setsize_abs, ^setsize_abs);
cc_setposition(0, $height32, ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(^white);
cc_setfill(true);
cc_settrans(255);
$int30 = calc($int30 + 1);
cc_create($component4, ^iftype_text, $int30);
cc_settext(enum(int, string, $enum20, $int29));
cc_setposition(0, $height32, ^setpos_abs_left, ^setpos_abs_top);
cc_settextfont(b12_full);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_setcolour($colour18);
cc_settextshadow(true);
cc_setsize($width35, 20, ^setsize_abs, ^setsize_abs);
$int30 = calc($int30 + 1);
$height32 = calc($height32 + 20);
$string0 = enum(int, string, $enum21, $int29);
$string0 = ~string_findandreplace($string0, "|", "<br><br>");
$int34 = paraheight($string0, calc($width35 - 10), $fontmetrics27);
cc_create($component4, ^iftype_rectangle, $int30);
cc_setsize($width35, calc(15 * $int34 + 15), ^setsize_abs, ^setsize_abs);
cc_setposition(0, $height32, ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(^white);
cc_setfill(true);
cc_settrans(235);
$int30 = calc($int30 + 1);
cc_create($component4, ^iftype_text, $int30);
cc_setposition(5, $height32, ^setpos_abs_left, ^setpos_abs_top);
cc_settext($string0);
cc_settextfont($graphic26);
cc_settextshadow(true);
cc_setcolour($colour18);
cc_settextalign(^settextalign_left, ^settextalign_centre, 15);
cc_setsize(calc($width35 - 10), calc(15 * $int34 + 15), ^setsize_abs, ^setsize_abs);
$int30 = calc($int30 + 1);
$height32 = calc($height32 + (15 * $int34 + 15));
$int29 = calc($int29 + 1);
}
$int29 = 0;
$int30 = 0;
$x31 = 5;
while ($int29 < enum_getoutputcount($enum22)) {
if ($int29 = 0 & $int28 = 0) {
cc_create($component5, ^iftype_rectangle, $int30);
cc_setsize($width36, $int39, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(^white);
cc_setfill(true);
cc_settrans(235);
$int30 = calc($int30 + 1);
cc_create($component5, ^iftype_text, $int30);
cc_setposition(0, $height33, ^setpos_abs_left, ^setpos_abs_top);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settext($string1);
cc_settextfont(p12_full);
cc_settextshadow(true);
cc_setcolour($colour18);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_setsize(calc($width36 - 10), $int39, ^setsize_abs, ^setsize_abs);
if (~on_mobile = false) {
cc_setonmouseover("league_info_mouseover($component5, $int30)");
cc_setonmouseleave("league_info_mouseleave($component5, $int30, $colour18)");
}
cc_setop(1, "Open Link");
cc_setonop("league_blog_click($url3)");
$height33 = calc($height33 + $int39);
$int30 = calc($int30 + 1);
}
cc_create($component5, ^iftype_rectangle, $int30);
cc_setsize($width36, 20, ^setsize_abs, ^setsize_abs);
cc_setposition(0, $height33, ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(^white);
cc_setfill(true);
cc_settrans(255);
$int30 = calc($int30 + 1);
cc_create($component5, ^iftype_text, $int30);
cc_settext(enum(int, string, $enum22, $int29));
cc_setposition(0, $height33, ^setpos_abs_left, ^setpos_abs_top);
cc_settextfont(b12_full);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_setcolour($colour18);
cc_settextshadow(true);
cc_setsize($width36, 20, ^setsize_abs, ^setsize_abs);
$int30 = calc($int30 + 1);
$height33 = calc($height33 + 20);
$string0 = enum(int, string, $enum23, $int29);
if ($int29 = 0) {
if ($int25 = 1) {
$string0 = append($string0, "|There is <tostring($int25)> day left in<br><~league_get_league_name>!");
} else {
$string0 = append($string0, "|There are <tostring($int25)> days left in<br><~league_get_league_name>!");
}
}
$string0 = ~string_findandreplace($string0, "|", "<br><br>");
$int34 = paraheight($string0, calc($width36 - 10), $fontmetrics27);
cc_create($component5, ^iftype_rectangle, $int30);
cc_setsize($width36, calc(15 * $int34 + 15), ^setsize_abs, ^setsize_abs);
cc_setposition(0, $height33, ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(^white);
cc_setfill(true);
cc_settrans(235);
$int30 = calc($int30 + 1);
cc_create($component5, ^iftype_text, $int30);
cc_setposition($x31, $height33, ^setpos_abs_left, ^setpos_abs_top);
cc_settext($string0);
cc_settextfont($graphic26);
cc_settextshadow(true);
cc_setcolour($colour18);
cc_settextalign(^settextalign_left, ^settextalign_centre, 15);
cc_setsize(calc($width36 - 10), calc(15 * $int34 + 15), ^setsize_abs, ^setsize_abs);
$int30 = calc($int30 + 1);
$height33 = calc($height33 + (15 * $int34 + 15));
$int29 = calc($int29 + 1);
}
cc_deleteall($component6);
cc_deleteall($component7);
def_int $height40 = if_getheight($component4);
if ($height32 > $height40) {
if_setscrollsize(0, $height32, $component4);
} else {
if_setscrollsize(0, 0, $component4);
}
~scrollbar_vertical($component6, $component4, "scrollbar_dragger_v2,3", "scrollbar_dragger_v2,0", "scrollbar_dragger_v2,1", "scrollbar_dragger_v2,2", "scrollbar_v2,0", "scrollbar_v2,1");
def_int $height41 = if_getheight($component5);
if ($height33 > $height41) {
if_setscrollsize(0, $height33, $component5);
} else {
if_setscrollsize(0, 0, $component5);
}
~scrollbar_vertical($component7, $component5, "scrollbar_dragger_v2,3", "scrollbar_dragger_v2,0", "scrollbar_dragger_v2,1", "scrollbar_dragger_v2,2", "scrollbar_v2,0", "scrollbar_v2,1");