-
Notifications
You must be signed in to change notification settings - Fork 11
/
[proc,poh_add_room_initbutton].cs2
54 lines (54 loc) · 2.07 KB
/
[proc,poh_add_room_initbutton].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
// 649
[proc,poh_add_room_initbutton](int $height0, int $int1, string $op0, int $int2)(int)
def_component $component3 = enum(int, component, enum_984, $int1);
if ($component3 = null) {
return($height0);
}
if_sethide(false, $component3);
def_int $width4 = if_getwidth($component3);
def_int $height5 = if_getheight($component3);
cc_deleteall($component3);
def_int $int6 = 0;
cc_create($component3, ^iftype_rectangle, $int6);
$int6 = calc($int6 + 1);
cc_setsize(238, $height5, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setfill(false);
cc_setcolour(0x333300);
cc_create($component3, ^iftype_text, $int6);
$int6 = calc($int6 + 1);
def_string $string1 = "<$op0>: Lvl <tostring($int2)>";
def_int $int7 = calc(parawidth($string1, 512, p12_full) + 10);
if ($int7 < 162) {
$int7 = 162;
}
cc_setsize($int7, $height5, ^setsize_abs, ^setsize_abs);
cc_setposition(calc(238 - $int7), 0, ^setpos_abs_left, ^setpos_abs_top);
cc_settextfont(p12_full);
cc_settextalign(^settextalign_left, ^settextalign_centre, 0);
cc_settextshadow(true);
cc_settext($string1);
cc_setcolour(0xccccff);
if_setonmouseover("cc_colour_swapper(event_com, cc_getid, 0xeeeeff)", $component3);
if_setonmouseleave("cc_colour_swapper(event_com, cc_getid, 0xccccff)", $component3);
cc_create($component3, ^iftype_text, $int6);
$int6 = calc($int6 + 1);
cc_setsize(calc($width4 - 238), $height5, ^setsize_abs, ^setsize_abs);
cc_setposition(238, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_settextfont(p12_full);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settextshadow(true);
def_obj $obj8 = enum(int, obj, enum_250, $int1);
if ($obj8 ! null) {
$int7 = oc_cost($obj8);
} else {
$int7 = 0;
}
$string1 = ",";
cc_settext("<~tostring_spacer($int7, $string1)> coins");
~poh_add_room_costupdate($int7);
cc_setoninvtransmit("poh_add_room_costupdate(event_com, event_comsubid, $int7){inv}");
if_setop(1, $op0, $component3);
if_setonop("poh_add_room_op(event_com, $int1)", $component3);
if_setposition(0, $height0, ^setpos_abs_left, ^setpos_abs_top, $component3);
return(calc($height0 + $height5 + 1));