-
Notifications
You must be signed in to change notification settings - Fork 0
/
[clientscript,poh_options_drawbutton].cs2
28 lines (28 loc) · 1.27 KB
/
[clientscript,poh_options_drawbutton].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
// 54
[clientscript,poh_options_drawbutton](component $component0)
cc_deleteall($component0);
def_int $width1 = if_getwidth($component0);
def_int $height2 = if_getheight($component0);
cc_create($component0, ^iftype_graphic, 0);
cc_setposition(10, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setsize(calc($width1 - 20), $height2, ^setsize_abs, ^setsize_abs);
cc_setgraphic("graphic_1048");
cc_settiling(true);
cc_create($component0, ^iftype_graphic, 1);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setsize(36, $height2, ^setsize_abs, ^setsize_abs);
cc_setgraphic("miscgraphics,4");
cc_create($component0, ^iftype_graphic, 2);
cc_setposition(calc($width1 - 36), 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setsize(36, $height2, ^setsize_abs, ^setsize_abs);
cc_setgraphic("miscgraphics,6");
cc_create($component0, ^iftype_text, 3);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setsize($width1, $height2, ^setsize_abs, ^setsize_abs);
cc_settextfont(p12_full);
cc_setcolour(0xff981f);
cc_settextshadow(true);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settext(if_getop(1, $component0));
if_setonmouseover("cc_colour_swapper(event_com, cc_getid, ^white)", $component0);
if_setonmouseleave("cc_colour_swapper(event_com, cc_getid, 0xff981f)", $component0);