-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,league_info_draw_interface].cs2
231 lines (231 loc) · 9.2 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
// 3218
[proc,league_info_draw_interface](component $component0, component $component1, component $component2, component $component3, component $component4, component $component5, component $component6, component $component7, component $component8, int $int9, int $int10, int $comsubid11)
cc_deleteall($component0);
cc_deleteall($component1);
cc_deleteall($component2);
cc_deleteall($component3);
cc_deleteall($component6);
cc_deleteall($component7);
def_struct $struct12 = enum(int, struct, enum_2670, %varbit10032);
if ($struct12 = null) {
return;
}
def_struct $struct13 = struct_1239;
def_int $colour14 = 0xff981f;
$colour14 = struct_param($struct12, param_1027);
if (cc_find(interface_654:2, $comsubid11) = ^true) {
cc_setcolour($colour14);
} else {
mes("Couldn't find the frame.");
}
cc_create($component0, ^iftype_text, 0);
cc_setposition(0, 1, ^setpos_abs_centre, ^setpos_abs_top);
cc_setsize(0, 1, ^setsize_minus, ^setsize_minus);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_setcolour($colour14);
cc_settextshadow(true);
cc_settextfont(b12_full);
cc_settext("General League Information");
cc_create($component1, ^iftype_text, 0);
cc_setposition(0, 1, ^setpos_abs_centre, ^setpos_abs_top);
cc_setsize(0, 1, ^setsize_minus, ^setsize_minus);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_setcolour($colour14);
cc_settextshadow(true);
cc_settextfont(b12_full);
cc_settext("League Specific Information");
def_enum $enum15 = struct_param($struct13, param_886);
def_enum $enum16 = struct_param($struct13, param_887);
def_enum $enum17 = struct_param($struct12, param_888);
def_enum $enum18 = struct_param($struct12, param_889);
def_int $int19 = struct_param($struct12, param_872);
def_int $int20 = calc(1 + ($int19 - %varbit9535));
def_fontmetrics $fontmetrics21 = p12_full;
def_fontmetrics $fontmetrics22 = p12_full;
if (~on_mobile = true) {
$fontmetrics21, $fontmetrics22 = p12_full, p12_full;
}
if ($int20 < 1) {
$int20 = 1;
}
def_int $int23 = 0;
def_int $int24 = 0;
def_int $x25 = 0;
def_int $height26 = 0;
def_int $height27 = 0;
def_int $int28 = 0;
def_string $string0 = "";
def_int $width29 = if_getwidth($component2);
def_int $width30 = if_getwidth($component3);
def_string $string1 = "<img=13> <~text_device("Click", "Tap")> to open the Leagues blog!<br>";
def_int $int31 = calc(12 * paraheight($string1, $width29 - 10, p12_full) + 10);
def_string $string2 = "<img=13> <~text_device("Click", "Tap")> to open the <~league_get_league_name> blog!<br>";
def_string $url3 = "https://osrs.game/Leagues";
def_string $url4 = "https://osrs.game/Trailblazer-League";
def_int $int32 = calc(12 * paraheight($string2, $width30 - 10, p12_full) + 10);
def_int $int33 = $int32;
if ($int31 > $int32) {
$int33 = $int31;
}
$int33 = calc($int33 + 10);
~leagues_menu_button($component6, $int24, $component7, $component8);
$int24 = 0;
~league_create_dropdown($component6, $component7, $component8, $int24, 0);
$int24 = 0;
while ($int23 < enum_getoutputcount($enum15)) {
if ($int23 = 0 & clienttype ! ^clienttype_ios) {
cc_create($component2, ^iftype_rectangle, $int24);
cc_setsize($width29, $int33, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(^white);
cc_setfill(true);
cc_settrans(235);
$int24 = calc($int24 + 1);
cc_create($component2, ^iftype_text, $int24);
cc_setposition(5, $height26, ^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($colour14);
cc_setsize(calc($width29 - 10), $int33, ^setsize_abs, ^setsize_abs);
if (~on_mobile = false) {
cc_setonmouseover("league_info_mouseover($component2, $int24)");
cc_setonmouseleave("league_info_mouseleave($component2, $int24, $colour14)");
}
cc_setop(1, "Open Link");
cc_setonop("league_blog_click($url3)");
$height26 = calc($height26 + $int33);
$int24 = calc($int24 + 1);
}
cc_create($component2, ^iftype_rectangle, $int24);
cc_setsize($width29, 20, ^setsize_abs, ^setsize_abs);
cc_setposition(0, $height26, ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(^white);
cc_setfill(true);
cc_settrans(255);
$int24 = calc($int24 + 1);
cc_create($component2, ^iftype_text, $int24);
cc_settext(enum(int, string, $enum15, $int23));
cc_setposition(0, $height26, ^setpos_abs_left, ^setpos_abs_top);
cc_settextfont(b12_full);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_setcolour($colour14);
cc_settextshadow(true);
cc_setsize($width29, 20, ^setsize_abs, ^setsize_abs);
$int24 = calc($int24 + 1);
$height26 = calc($height26 + 20);
$string0 = enum(int, string, $enum16, $int23);
$string0 = ~script1299($string0, "|", "<br><br>");
$int28 = paraheight($string0, calc($width29 - 10), $fontmetrics22);
cc_create($component2, ^iftype_rectangle, $int24);
cc_setsize($width29, calc(15 * $int28 + 15), ^setsize_abs, ^setsize_abs);
cc_setposition(0, $height26, ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(^white);
cc_setfill(true);
cc_settrans(235);
$int24 = calc($int24 + 1);
cc_create($component2, ^iftype_text, $int24);
cc_setposition(5, $height26, ^setpos_abs_left, ^setpos_abs_top);
cc_settext($string0);
cc_settextfont($fontmetrics21);
cc_settextshadow(true);
cc_setcolour($colour14);
cc_settextalign(^settextalign_left, ^settextalign_centre, 15);
cc_setsize(calc($width29 - 10), calc(15 * $int28 + 15), ^setsize_abs, ^setsize_abs);
$int24 = calc($int24 + 1);
$height26 = calc($height26 + (15 * $int28 + 15));
$int23 = calc($int23 + 1);
}
$int23 = 0;
$int24 = 0;
$x25 = 5;
while ($int23 < enum_getoutputcount($enum17)) {
if ($int23 = 0 & clienttype ! ^clienttype_ios) {
cc_create($component3, ^iftype_rectangle, $int24);
cc_setsize($width30, $int33, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(^white);
cc_setfill(true);
cc_settrans(235);
$int24 = calc($int24 + 1);
cc_create($component3, ^iftype_text, $int24);
cc_setposition(5, $height27, ^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($colour14);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_setsize(calc($width30 - 10), $int33, ^setsize_abs, ^setsize_abs);
if (~on_mobile = false) {
cc_setonmouseover("league_info_mouseover($component3, $int24)");
cc_setonmouseleave("league_info_mouseleave($component3, $int24, $colour14)");
}
cc_setop(1, "Open Link");
cc_setonop("league_blog_click($url4)");
$height27 = calc($height27 + $int33);
$int24 = calc($int24 + 1);
}
cc_create($component3, ^iftype_rectangle, $int24);
cc_setsize($width30, 20, ^setsize_abs, ^setsize_abs);
cc_setposition(0, $height27, ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(^white);
cc_setfill(true);
cc_settrans(255);
$int24 = calc($int24 + 1);
cc_create($component3, ^iftype_text, $int24);
cc_settext(enum(int, string, $enum17, $int23));
cc_setposition(0, $height27, ^setpos_abs_left, ^setpos_abs_top);
cc_settextfont(b12_full);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_setcolour($colour14);
cc_settextshadow(true);
cc_setsize($width30, 20, ^setsize_abs, ^setsize_abs);
$int24 = calc($int24 + 1);
$height27 = calc($height27 + 20);
$string0 = enum(int, string, $enum18, $int23);
if ($int23 = 0) {
if ($int20 = 1) {
$string0 = append($string0, "|There is <tostring($int20)> day left in<br><~league_get_league_name>!");
} else {
$string0 = append($string0, "|There are <tostring($int20)> days left in<br><~league_get_league_name>!");
}
}
$string0 = ~script1299($string0, "|", "<br><br>");
$int28 = paraheight($string0, calc($width30 - 10), $fontmetrics22);
cc_create($component3, ^iftype_rectangle, $int24);
cc_setsize($width30, calc(15 * $int28 + 15), ^setsize_abs, ^setsize_abs);
cc_setposition(0, $height27, ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(^white);
cc_setfill(true);
cc_settrans(235);
$int24 = calc($int24 + 1);
cc_create($component3, ^iftype_text, $int24);
cc_setposition($x25, $height27, ^setpos_abs_left, ^setpos_abs_top);
cc_settext($string0);
cc_settextfont($fontmetrics21);
cc_settextshadow(true);
cc_setcolour($colour14);
cc_settextalign(^settextalign_left, ^settextalign_centre, 15);
cc_setsize(calc($width30 - 10), calc(15 * $int28 + 15), ^setsize_abs, ^setsize_abs);
$int24 = calc($int24 + 1);
$height27 = calc($height27 + (15 * $int28 + 15));
$int23 = calc($int23 + 1);
}
cc_deleteall($component4);
cc_deleteall($component5);
def_int $height34 = if_getheight($component2);
if ($height26 > $height34) {
if_setscrollsize(0, $height26, $component2);
} else {
if_setscrollsize(0, 0, $component2);
}
~scrollbar_vertical($component4, $component2, "scrollbar_dragger_v2,3", "scrollbar_dragger_v2,0", "scrollbar_dragger_v2,1", "scrollbar_dragger_v2,2", "scrollbar_v2,0", "scrollbar_v2,1");
def_int $height35 = if_getheight($component3);
if ($height27 > $height35) {
if_setscrollsize(0, $height27, $component3);
} else {
if_setscrollsize(0, 0, $component3);
}
~scrollbar_vertical($component5, $component3, "scrollbar_dragger_v2,3", "scrollbar_dragger_v2,0", "scrollbar_dragger_v2,1", "scrollbar_dragger_v2,2", "scrollbar_v2,0", "scrollbar_v2,1");