-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,league_areas_progress_bar].cs2
185 lines (185 loc) · 6.27 KB
/
[proc,league_areas_progress_bar].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
// 3684
[proc,league_areas_progress_bar](component $component0, component $component1, int $int2, int $int3)
if_setop(1, "", $component0);
if_setopbase("", $component0);
if ($int3 = 1) {
$int2 = 0;
}
def_struct $struct4 = enum(int, struct, enum_2670, %varbit10032);
def_enum $enum5 = null;
def_struct $struct6 = null;
def_int $int7 = 0;
def_int $int8 = 1;
def_int $int9 = 0;
def_int $comsubid10 = -1;
def_struct $struct11 = ~script3682($int3);
def_int $int12 = -1;
def_int $int13 = if_getwidth($component0);
def_string $string0 = "";
def_int $int14 = -1;
def_int $int15 = 0;
def_graphic $graphic16 = struct_param($struct4, param_1022);
def_graphic $graphic17 = struct_param($struct4, param_1023);
if ($struct11 ! null) {
$int12 = struct_param($struct11, param_1010);
}
if ($int12 ! -1 & $int3 = 0) {
$int13 = calc($int13 - 15);
}
if (cc_find($component0, 0) = ^false) {
cc_create($component0, ^iftype_rectangle, $int9);
cc_setsize(calc($int13 - 4), 29, ^setsize_abs, ^setsize_abs);
cc_setposition(2, 2, ^setpos_abs_left, ^setpos_abs_top);
cc_setfill(false);
cc_setcolour(0x474745);
$int9 = calc($int9 + 1);
cc_create($component0, ^iftype_graphic, $int9);
cc_setsize(calc($int13 - 6), 27, ^setsize_abs, ^setsize_abs);
cc_setposition(3, 3, ^setpos_abs_left, ^setpos_abs_top);
cc_setgraphic(struct_param($struct4, param_1025));
cc_settiling(true);
$int9 = calc($int9 + 1);
cc_create($component0, ^iftype_graphic, $int9);
cc_setsize(1, 27, ^setsize_abs, ^setsize_abs);
cc_setposition(3, 3, ^setpos_abs_left, ^setpos_abs_top);
cc_setgraphic(struct_param($struct4, param_1024));
cc_settiling(true);
$int9 = calc($int9 + 1);
if ($int3 = 0) {
cc_create($component0, ^iftype_text, $int9);
cc_setsize($int13, 0, ^setsize_abs, ^setsize_minus);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_settextfont(struct_param($struct4, param_1032));
cc_setcolour(struct_param($struct4, param_1029));
cc_settextshadow(struct_param($struct4, param_1030));
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settext("");
$int9 = calc($int9 + 1);
cc_create($component0, ^iftype_rectangle, $int9);
cc_setsize($int13, 31, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setfill(false);
cc_setcolour(0x0e0e0c);
$int9 = calc($int9 + 1);
if ($int12 ! -1) {
cc_create($component0, ^iftype_graphic, $int9);
cc_setsize(30, 30, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_right, ^setpos_abs_bottom);
cc_setgraphic($graphic17);
$int9 = calc($int9 + 1);
}
} else {
if ($struct4 ! null) {
$enum5 = enum_3369;
if ($enum5 ! null) {
$int7 = enum_getoutputcount($enum5);
while ($int8 < $int7) {
$struct6 = enum(int, struct, $enum5, $int8);
cc_create($component0, ^iftype_graphic, $int9);
cc_setsize(10, 31, ^setsize_abs, ^setsize_abs);
$int15 = struct_param($struct6, param_1010);
$int14 = scale($int15, $int12, calc($int13 - 4));
if ($int14 <= 2) {
$int14 = 0;
} else if ($int14 >= calc($int13 - 4)) {
$int14 = $int13;
} else {
$int14 = calc($int14 + 2);
}
cc_setposition(calc($int14 - 5), 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setgraphic(struct_param($struct4, param_1031));
if ($int15 = 1) {
$string0 = "Area unlocked at <tostring($int15)> task.";
} else {
$string0 = "Area unlocked at <tostring($int15)> tasks.";
}
if (~on_mobile = true) {
cc_setop(1, "Show Threshold");
cc_setonop("league_progress_bar_mobile_tooltip(event_com, event_comsubid, $component1, $string0, 512)");
} else {
cc_setop(1, "");
cc_setonmouserepeat("tooltip_mouserepeat(event_com, event_comsubid, $component1, $string0, 25, 512)");
cc_setonmouseleave("deltooltip($component1)");
}
$int8 = calc($int8 + 1);
$int9 = calc($int9 + 1);
}
}
}
cc_create($component0, ^iftype_text, $int9);
cc_setsize($int13, 0, ^setsize_abs, ^setsize_minus);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_settextfont(struct_param($struct4, param_1032));
cc_setcolour(struct_param($struct4, param_1029));
cc_settextshadow(struct_param($struct4, param_1030));
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settext("");
$comsubid10 = $int9;
$int9 = calc($int9 + 1);
cc_create($component0, ^iftype_rectangle, $int9);
cc_setsize($int13, 33, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setfill(false);
cc_setcolour(0x0e0e0c);
$int9 = calc($int9 + 1);
cc_create($component0, ^iftype_rectangle, $int9);
cc_setsize(calc($int13 - 2), 31, ^setsize_abs, ^setsize_abs);
cc_setposition(1, 1, ^setpos_abs_left, ^setpos_abs_top);
cc_setfill(false);
cc_setcolour(0x0e0e0c);
$int9 = calc($int9 + 1);
}
}
if ($int3 = 0) {
$comsubid10 = 3;
}
def_int $width18 = calc($int13 - 4);
def_int $width19 = $width18;
if ($int12 ! -1 & $int12 > 0) {
$width19 = scale(%varbit10046, $int12, $width18);
}
if ($width19 > $width18) {
$width19 = $width18;
}
if (cc_find($component0, 2) = ^true) {
if ($int2 = 1) {
if (cc_getwidth > $width19) {
cc_setsize(0, cc_getheight, ^setsize_abs, ^setsize_abs);
}
if_setontimer("league_points_progress_bar_expand($component0, $width19)", $component0);
} else {
cc_setsize($width19, cc_getheight, ^setsize_abs, ^setsize_abs);
}
}
def_int $int20 = -1;
if ($comsubid10 ! -1 & cc_find($component0, $comsubid10) = ^true) {
if ($int3 = 0 & $int12 ! -1) {
if (%varbit10046 >= $int12) {
if (%varbit10037 < 7) {
cc_settext("You have completed enough tasks to unlock your next area!");
} else {
cc_settext("<~text_device("Click", "Tap")> here to select your next area!");
if_setop(1, "View", $component0);
if_setopbase("<col=ff981f>Areas</col>", $component0);
}
} else {
$int20 = calc($int12 - %varbit10046);
if ($int20 = 1) {
cc_settext("<tostring($int20)> task until your next area.");
} else {
cc_settext("<tostring($int20)> tasks until your next area.");
}
}
} else if (%varbit10046 = 1) {
cc_settext("<tostring(%varbit10046)> task completed");
} else {
cc_settext("<tostring(%varbit10046)> tasks completed");
}
}
if ($int3 = 0 & cc_find($component0, 5) = ^true) {
if (%varbit10046 >= $int12) {
cc_setgraphic($graphic16);
} else {
cc_setgraphic($graphic17);
}
}