-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,script1272].cs2
51 lines (51 loc) · 1.73 KB
/
[proc,script1272].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
// 1272
[proc,script1272](component $component0, int $int1)
def_obj $obj2 = null;
def_int $int3 = 0;
def_int $int4 = 0;
if ($int1 = 0) {
while ($int4 < 816) {
$obj2 = inv_getobj(bank, $int4);
if (oc_unplaceholder($obj2) ! $obj2) {
$int3 = calc($int3 + 1);
}
$int4 = calc($int4 + 1);
}
}
cc_deleteall($component0);
def_int $int5 = 0;
if ($int3 > 0) {
$int5 = ~options_button_on($component0, $int5);
} else {
$int5 = ~options_button_off($component0, $int5);
}
cc_create($component0, ^iftype_graphic, $int5);
$int5 = calc($int5 + 1);
cc_setsize(29, 22, ^setsize_abs, ^setsize_abs);
cc_setposition(3, 0, ^setpos_abs_left, ^setpos_abs_centre);
cc_setgraphic("bankbuttons,7");
def_string $string0 = "Release all placeholders";
if ($int3 > 0) {
$string0 = append($string0, " (<~tostring_spacer($int3, ",")>)");
}
if_setop(6, $string0, $component0);
def_int $width6 = parawidth($string0, calc(if_getwidth(if_getlayer($component0)) - 40), p12_full);
cc_create($component0, ^iftype_text, $int5);
cc_setsize($width6, 0, ^setsize_abs, ^setsize_minus);
cc_setposition(8, 0, ^setpos_abs_right, ^setpos_abs_centre);
cc_settextshadow(true);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settextfont(p12_full);
cc_settext($string0);
if ($int3 > 0) {
cc_setcolour(0xff981f);
if_setonmouseover("cc_colour_swapper(event_com, $int5, ^white)", $component0);
if_setonmouseleave("cc_colour_swapper(event_com, $int5, 0xff981f)", $component0);
if_setonop("script1273(event_opindex, $component0)", $component0);
} else {
cc_setcolour(0x8f8f8f);
if_setonmouseover(null, $component0);
if_setonmouseleave(null, $component0);
if_setonop(null, $component0);
}
if_setsize(calc($width6 + 40), if_getheight($component0), ^setsize_abs, ^setsize_abs, $component0);