-
Notifications
You must be signed in to change notification settings - Fork 11
/
[proc,poh_jewellery_box_addbutton].cs2
32 lines (32 loc) · 1.61 KB
/
[proc,poh_jewellery_box_addbutton].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
// 1688
[proc,poh_jewellery_box_addbutton](component $component0, int $int1, string $string0, int $int2, int $int3, int $int4, int $int5, int $int6)(int, int)
.cc_create(poh_jewellery_box:0, ^iftype_rectangle, $int6);
.cc_setsize(1, 1, ^setsize_abs, ^setsize_abs);
.cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
if ($int3 < $int1) {
return($int4, $int5);
}
cc_create($component0, ^iftype_text, $int4);
cc_setsize(80, $int2, ^setsize_minus, ^setsize_abs);
cc_setposition(5, $int5, ^setpos_abs_right, ^setpos_abs_centre);
cc_setcolour(0xff981f);
cc_setonmouserepeat("cc_colour_swapper(event_com, event_comsubid, ^white)");
cc_setonmouseleave("cc_colour_swapper(event_com, event_comsubid, 0xff981f)");
cc_settextfont(p11_full);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settextshadow(true);
cc_setop(1, removetags($string0));
def_string $string1 = "";
def_string $string2 = "";
if ($int6 < 9) {
$string1 = tostring(calc($int6 + 1));
$string0 = "<col=ccccff><$string1>:</col> <$string0>";
.cc_setonkey("poh_jewellery_box_keypress(event_keychar, event_comsubid, $component0, $int4, $string0, $string1, $string2)");
} else if ($int6 < 35) {
$string1, $string2 = enum(int, string, enum_1401, calc($int6 - 8)), enum(int, string, enum_1402, calc($int6 - 8));
$string0 = "<col=ccccff><$string1>:</col> <$string0>";
.cc_setonkey("poh_jewellery_box_keypress(event_keychar, event_comsubid, $component0, $int4, $string0, $string1, $string2)");
}
cc_settext($string0);
cc_setonop("poh_jewellery_box_op(event_opindex, $int6, $component0, $int4, $string0, $string1, $string2)");
return(calc($int4 + 1), calc($int5 + $int2));