-
Notifications
You must be signed in to change notification settings - Fork 11
/
[proc,ge_offers_bigbutton].cs2
29 lines (29 loc) · 1.15 KB
/
[proc,ge_offers_bigbutton].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
// 541
[proc,ge_offers_bigbutton](component $component0, string $string0, int $int1)
if_setsize(calc(parawidth($string0, 512, p11_full) + 10), if_getheight($component0), ^setsize_abs, ^setsize_abs, $component0);
cc_deleteall($component0);
def_int $comsubid2 = 0;
if ($int1 = 1) {
$comsubid2 = ~options_button_on($component0, 0);
} else {
$comsubid2 = ~options_button_off($component0, 0);
}
cc_create($component0, ^iftype_text, $comsubid2);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setsize(0, 0, ^setsize_minus, ^setsize_minus);
cc_settextfont(p11_full);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settextshadow(true);
cc_settext($string0);
if_setop(1, $string0, $component0);
if ($int1 = 1) {
cc_setcolour(^white);
if_setonmouserepeat(null, $component0);
if_setonmouseleave(null, $component0);
if_setonop(null, $component0);
} else {
cc_setcolour(0xff981f);
if_setonmouserepeat("cc_colour_swapper(event_com, $comsubid2, ^white)", $component0);
if_setonmouseleave("cc_colour_swapper(event_com, $comsubid2, 0xff981f)", $component0);
if_setonop("ge_offers_bigbutton_op(event_opindex, $component0, $string0)", $component0);
}