-
Notifications
You must be signed in to change notification settings - Fork 11
/
[proc,poll_setbutton].cs2
28 lines (28 loc) · 1.14 KB
/
[proc,poll_setbutton].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
// 606
[proc,poll_setbutton](component $component0, component $component1, string $string0)
if_setontimer(null, $component0);
cc_deleteall($component0);
if (string_length($string0) <= 0) {
if_sethide(true, $component0);
return;
}
if_sethide(false, $component0);
def_int $width2 = if_getwidth($component0);
def_int $height3 = if_getheight($component0);
cc_create($component0, ^iftype_graphic, 0);
.cc_create($component0, ^iftype_text, 1);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
.cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setsize($width2, $height3, ^setsize_abs, ^setsize_abs);
.cc_setsize($width2, $height3, ^setsize_abs, ^setsize_abs);
cc_settiling(true);
cc_setgraphic("combatboxesmed,0");
.cc_settextfont(p11_full);
.cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
.cc_setcolour(0xff981f);
.cc_settextshadow(true);
.cc_settext($string0);
cc_setop(1, $string0);
cc_setonop("poll_buttonop($component0, $component1, $string0, cc_getid, .cc_getid)");
cc_setonmouseover("poll_buttonhover(true, $component0, cc_getid, .cc_getid)");
cc_setonmouseleave("poll_buttonhover(false, $component0, cc_getid, .cc_getid)");