-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[clientscript,itemsets_init].cs2
39 lines (39 loc) · 1.39 KB
/
[clientscript,itemsets_init].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
// 822
[clientscript,itemsets_init](component $component0, component $component1)
cc_deleteall($component0);
cc_deleteall($component1);
def_int $int2 = calc((if_getwidth($component0) - 36 * 8) / 7 + 36);
def_int $int3 = 0;
def_namedobj $namedobj4 = null;
def_int $int5 = 0;
def_enum $enum6 = enum(int, enum, enum_1033, $int5);
while ($enum6 ! null) {
$namedobj4 = enum(int, namedobj, $enum6, -1);
cc_create($component0, ^iftype_graphic, $int5);
if ($namedobj4 ! null) {
cc_sethide(false);
cc_setsize(36, 32, ^setsize_abs, ^setsize_abs);
$int3 = calc($int5 / 8 * 48);
cc_setposition(calc($int5 % 8 * $int2), $int3, ^setpos_abs_left, ^setpos_abs_top);
cc_setobject_nonum($namedobj4, 1);
cc_setopbase("<col=ff9040><oc_name($namedobj4)></col>");
cc_setgraphicshadow(0x333333);
cc_setoutline(1);
~itemsets_redraw($enum6);
cc_setoninvtransmit("itemsets_redraw(event_com, event_comsubid, $enum6){inv}");
} else {
cc_sethide(true);
}
$int5 = calc($int5 + 1);
$enum6 = enum(int, enum, enum_1033, $int5);
}
if ($int3 > 0) {
$int3 = calc($int3 + 32);
}
if_setscrollpos(0, 0, $component0);
if ($int3 > if_getheight($component0)) {
if_setscrollsize(0, $int3, $component0);
} else {
if_setscrollsize(0, 0, $component0);
}
~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");