-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,tournament_supplies_previewarea].cs2
70 lines (70 loc) · 2.5 KB
/
[proc,tournament_supplies_previewarea].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
// 2696
[proc,tournament_supplies_previewarea](component $component0)
def_int $int1 = 0;
def_component $component2 = null;
def_obj $obj3 = null;
def_int $size4 = 0;
def_int $size5 = inv_size(worn);
while ($size4 < $size5) {
$component2 = enum(int, component, enum_678, $size4);
if ($component2 ! null) {
cc_deleteall($component2);
cc_create($component2, ^iftype_graphic, 0);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setsize(36, 36, ^setsize_abs, ^setsize_abs);
cc_setgraphic("miscgraphics,0");
cc_create($component2, ^iftype_graphic, 1);
$obj3 = inv_getobj(inv_207, $size4);
if ($obj3 ! null) {
cc_setsize(36, 32, ^setsize_abs, ^setsize_abs);
cc_setposition(2, 0, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setgraphicshadow(0x333333);
cc_setoutline(1);
cc_setobject($obj3, inv_getnum(inv_207, $size4));
if_setopbase("<col=ff9040><oc_name($obj3)></col>", $component2);
if_setop(10, "Examine", $component2);
if_setonop("cc_settrans_temporarily(event_com, cc_getid, 100, 0)", $component2);
$int1 = 1;
} else {
cc_setsize(32, 32, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setgraphic(enum(int, graphic, enum_904, $size4));
if_clearops($component2);
if_setonop(null, $component2);
}
}
$size4 = calc($size4 + 1);
}
cc_deleteall($component0);
def_int $int6 = calc((if_getwidth($component0) - 4 - 4 * 36) / 3 + 36);
def_int $int7 = calc((if_getheight($component0) - 4 - 7 * 32) / 6 + 32);
def_int $size8 = 0;
def_int $size9 = inv_size(inv);
while ($size8 < $size9) {
$obj3 = inv_getobj(inv_207, $size4);
cc_create($component0, ^iftype_graphic, $size8);
if ($obj3 ! null) {
cc_sethide(false);
cc_setposition(calc(2 + $int6 * ($size8 % 4)), calc(2 + $int7 * ($size8 / 4)), ^setpos_abs_left, ^setpos_abs_top);
cc_setsize(36, 32, ^setsize_abs, ^setsize_abs);
cc_setgraphicshadow(0x333333);
cc_setoutline(1);
cc_setobject($obj3, inv_getnum(inv_207, $size4));
cc_setopbase("<col=ff9040><oc_name($obj3)></col>");
cc_setop(10, "Examine");
$int1 = 1;
} else {
cc_sethide(true);
}
$size8, $size4 = calc($size8 + 1), calc($size4 + 1);
}
if ($int1 = 0) {
cc_create($component0, ^iftype_text, $size8);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setsize(0, 0, ^setsize_minus, ^setsize_minus);
cc_setcolour(0xff981f);
cc_settextfont(p12_full);
cc_settextshadow(true);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 20);
cc_settext("Select a load-out<br>to preview it.");
}