-
Notifications
You must be signed in to change notification settings - Fork 0
/
[proc,dynamic_stone_button_filled_main].cs2
63 lines (63 loc) · 4.6 KB
/
[proc,dynamic_stone_button_filled_main].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
56
57
58
59
60
61
62
63
// 5845
[proc,dynamic_stone_button_filled_main](component $component0, component $component1, string $string0, fontmetrics $fontmetrics2, int $colour3, int $colour4, int $colour5, int $int6, int $int7, int $int8, int $int9, int $int10, int $comsubid11, int $int12, int $int13)(int)
def_int $int14 = calc($int8 - 9);
def_int $int15 = calc($int9 - 9);
def_int $width16 = calc($int8 - 18);
def_int $height17 = calc($int9 - 18);
~create_graphic($component0, $int10, "tradebacking", $int6, $int7, ^setpos_abs_left, ^setpos_abs_top, $int8, $int9, ^setsize_abs, ^setsize_abs);
if ($int13 = 1) {
~create_graphic($component0, calc(1 + $int10), "v2_stone_button_in,0", $int6, $int7, ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc(2 + $int10), "v2_stone_button_in,1", calc($int6 + $int14), $int7, ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc(3 + $int10), "v2_stone_button_in,2", $int6, calc($int7 + $int15), ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc(4 + $int10), "v2_stone_button_in,3", calc($int6 + $int14), calc($int7 + $int15), ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc(5 + $int10), "v2_stone_button_in,4", $int6, calc($int7 + 9), ^setpos_abs_left, ^setpos_abs_top, 9, $height17, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc(6 + $int10), "v2_stone_button_in,5", calc($int6 + 9), $int7, ^setpos_abs_left, ^setpos_abs_top, $width16, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc(7 + $int10), "v2_stone_button_in,6", calc($int6 + $int14), calc($int7 + 9), ^setpos_abs_left, ^setpos_abs_top, 9, $height17, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc(8 + $int10), "v2_stone_button_in,7", calc($int6 + 9), calc($int7 + $int15), ^setpos_abs_left, ^setpos_abs_top, $width16, 9, ^setsize_abs, ^setsize_abs);
} else {
~create_graphic($component0, calc(1 + $int10), "v2_stone_button,0", $int6, $int7, ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc(2 + $int10), "v2_stone_button,1", calc($int6 + $int14), $int7, ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc(3 + $int10), "v2_stone_button,2", $int6, calc($int7 + $int15), ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc(4 + $int10), "v2_stone_button,3", calc($int6 + $int14), calc($int7 + $int15), ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc(5 + $int10), "v2_stone_button,4", $int6, calc($int7 + 9), ^setpos_abs_left, ^setpos_abs_top, 9, $height17, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc(6 + $int10), "v2_stone_button,5", calc($int6 + 9), $int7, ^setpos_abs_left, ^setpos_abs_top, $width16, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc(7 + $int10), "v2_stone_button,6", calc($int6 + $int14), calc($int7 + 9), ^setpos_abs_left, ^setpos_abs_top, 9, $height17, ^setsize_abs, ^setsize_abs);
~create_graphic($component0, calc(8 + $int10), "v2_stone_button,7", calc($int6 + 9), calc($int7 + $int15), ^setpos_abs_left, ^setpos_abs_top, $width16, 9, ^setsize_abs, ^setsize_abs);
}
def_int $int18 = ~max($int8, 26);
def_int $int19 = ~max($int9, 26);
def_int $x20 = calc($int6 - ($int18 - $int8) / 2);
def_int $y21 = calc($int7 - ($int19 - $int9) / 2);
def_boolean $boolean22 = false;
if ($int12 = 1 & $component1 ! null) {
$boolean22 = ~on_mobile;
cc_create($component1, ^iftype_rectangle, $comsubid11);
if ($boolean22 = true) {
cc_setsize($int18, $int19, ^setsize_abs, ^setsize_abs);
cc_setposition($x20, $y21, ^setpos_abs_left, ^setpos_abs_top);
} else {
cc_setsize($int8, $int9, ^setsize_abs, ^setsize_abs);
cc_setposition($int6, $int7, ^setpos_abs_left, ^setpos_abs_top);
if ($int13 = 0) {
cc_setonmouseover("v2_stone_button_in_filled_free($component0, $int10, $colour4)");
cc_setonmouseleave("v2_stone_button_filled_free($component0, $int10, $colour3)");
}
}
cc_settrans(255);
}
if (string_length($string0) > 0) {
cc_create($component0, ^iftype_text, calc(9 + $int10));
cc_setsize($int8, $int9, ^setsize_abs, ^setsize_abs);
cc_setposition($int6, $int7, ^setpos_abs_left, ^setpos_abs_top);
cc_settext($string0);
cc_settextfont($fontmetrics2);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settextshadow(true);
if ($int12 = 1) {
cc_setcolour($colour3);
} else {
cc_setcolour($colour5);
}
return(calc(10 + $int10));
}
return(calc(9 + $int10));