-
Notifications
You must be signed in to change notification settings - Fork 11
/
[proc,create_v2_stone_button_filled_free_icon].cs2
55 lines (55 loc) · 4.42 KB
/
[proc,create_v2_stone_button_filled_free_icon].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
55
// 2979
[proc,create_v2_stone_button_filled_free_icon](component $component0, int $int1, int $width2, int $int3, int $int4, int $int5, string $text0, int $colour6, int $colour7, int $int8, int $int9, graphic $graphic10)(int)
def_int $int11 = 0;
def_int $x12 = calc($width2 - 9 + $int4);
def_int $y13 = calc($int3 - 9 + $int5);
def_int $width14 = calc($width2 - 18);
def_int $height15 = calc($int3 - 18);
if ($int9 = 0) {
~create_graphic($component0, $int1, "tradebacking", $int4, $int5, ^setpos_abs_left, ^setpos_abs_top, $width2, $int3, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc($int1 + 1), "v2_stone_button,0", $int4, $int5, ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc($int1 + 2), "v2_stone_button,1", $x12, $int5, ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc($int1 + 3), "v2_stone_button,2", $int4, $y13, ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc($int1 + 4), "v2_stone_button,3", $x12, $y13, ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc($int1 + 5), "v2_stone_button,4", $int4, calc(9 + $int5), ^setpos_abs_left, ^setpos_abs_top, 9, $height15, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc($int1 + 6), "v2_stone_button,5", calc($int4 + 9), $int5, ^setpos_abs_left, ^setpos_abs_top, $width14, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc($int1 + 7), "v2_stone_button,6", $x12, calc(9 + $int5), ^setpos_abs_left, ^setpos_abs_top, 9, $height15, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc($int1 + 8), "v2_stone_button,7", calc($int4 + 9), $y13, ^setpos_abs_left, ^setpos_abs_top, $width14, 9, ^setsize_abs, ^setsize_abs);
} else {
~create_graphic($component0, $int1, "tradebacking_dark", $int4, $int5, ^setpos_abs_left, ^setpos_abs_top, $width2, $int3, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc($int1 + 1), "v2_stone_button_in,0", $int4, $int5, ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc($int1 + 2), "v2_stone_button_in,1", $x12, $int5, ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc($int1 + 3), "v2_stone_button_in,2", $int4, $y13, ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc($int1 + 4), "v2_stone_button_in,3", $x12, $y13, ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc($int1 + 5), "v2_stone_button_in,4", $int4, calc(9 + $int5), ^setpos_abs_left, ^setpos_abs_top, 9, $height15, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc($int1 + 6), "v2_stone_button_in,5", calc(9 + $int4), $int5, ^setpos_abs_left, ^setpos_abs_top, $width14, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc($int1 + 7), "v2_stone_button_in,6", $x12, calc(9 + $int5), ^setpos_abs_left, ^setpos_abs_top, 9, $height15, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc($int1 + 8), "v2_stone_button_in,7", calc($int4 + 9), $y13, ^setpos_abs_left, ^setpos_abs_top, $width14, 9, ^setsize_abs, ^setsize_abs);
}
cc_create($component0, ^iftype_graphic, calc($int1 + 9));
cc_setsize(25, 25, ^setsize_abs, ^setsize_abs);
cc_setposition(3, calc($int3 / 2 - 25 / 2 + $int5), ^setpos_abs_left, ^setpos_abs_top);
cc_setgraphic($graphic10);
cc_create($component0, ^iftype_text, calc($int1 + 10));
cc_setsize(calc($width2 - 25 - 10), calc($int3 - 6), ^setsize_abs, ^setsize_abs);
cc_setposition(calc(5 + 25 + $int4), calc(3 + $int5), ^setpos_abs_left, ^setpos_abs_top);
cc_settext($text0);
cc_settextfont(p12_full);
cc_settextshadow(true);
cc_setcolour($colour6);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 20);
cc_create($component0, ^iftype_graphic, calc($int1 + 11));
cc_setsize($width2, $int3, ^setsize_abs, ^setsize_abs);
cc_setposition($int4, $int5, ^setpos_abs_left, ^setpos_abs_top);
if ($int8 ! 0) {
cc_setop(1, "Show task: <col=ff9040><$text0>");
}
if ($int9 = 0) {
if (~on_mobile = true) {
cc_setonmouseover("v2_stone_button_in_filled_free_icon($component0, $int1, $colour6)");
} else {
cc_setonmouseover("v2_stone_button_in_filled_free_icon($component0, $int1, $colour7)");
}
cc_setonmouseleave("v2_stone_button_filled_free_icon($component0, $int1, $colour6)");
}
return(calc($int1 + 12));