-
Notifications
You must be signed in to change notification settings - Fork 0
/
[proc,adventurepath_side_create_toggle].cs2
66 lines (66 loc) · 3.43 KB
/
[proc,adventurepath_side_create_toggle].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
64
65
66
// 3035
[proc,adventurepath_side_create_toggle](int $int0, int $int1, component $component2, int $int3, int $int4, int $int5, int $int6, string $text0, int $int7, int $int8)(int, int)
def_int $int9 = $int0;
def_int $int10 = 5;
if ($int10 < 5) {
$int3 = calc($int3 + 16);
}
def_int $x11 = calc($int3 - 9 + $int5);
def_int $y12 = calc($int4 - 9 + $int6);
def_int $width13 = calc($int3 - 18);
def_int $height14 = calc($int4 - 18);
~create_graphic($component2, $int0, "tradebacking", $int5, $int6, ^setpos_abs_left, ^setpos_abs_top, $int3, $int4, ^setsize_abs, ^setsize_abs);
~create_graphic($component2, calc($int0 + 1), "v2_stone_button,0", $int5, $int6, ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component2, calc($int0 + 2), "v2_stone_button,1", $x11, $int6, ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component2, calc($int0 + 3), "v2_stone_button,2", $int5, $y12, ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component2, calc($int0 + 4), "v2_stone_button,3", $x11, $y12, ^setpos_abs_left, ^setpos_abs_top, 9, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component2, calc($int0 + 5), "v2_stone_button,4", $int5, calc(9 + $int6), ^setpos_abs_left, ^setpos_abs_top, 9, $height14, ^setsize_abs, ^setsize_abs);
~create_graphic($component2, calc($int0 + 6), "v2_stone_button,5", calc($int5 + 9), $int6, ^setpos_abs_left, ^setpos_abs_top, $width13, 9, ^setsize_abs, ^setsize_abs);
~create_graphic($component2, calc($int0 + 7), "v2_stone_button,6", $x11, calc(9 + $int6), ^setpos_abs_left, ^setpos_abs_top, 9, $height14, ^setsize_abs, ^setsize_abs);
~create_graphic($component2, calc($int0 + 8), "v2_stone_button,7", calc($int5 + 9), $y12, ^setpos_abs_left, ^setpos_abs_top, $width13, 9, ^setsize_abs, ^setsize_abs);
cc_create($component2, ^iftype_text, calc($int0 + 9));
if ($int10 > 4) {
cc_setsize(calc($int3 - 46), $int4, ^setsize_abs, ^setsize_abs);
} else {
cc_setsize(calc($int3 - 39), $int4, ^setsize_abs, ^setsize_abs);
}
cc_setposition(calc(3 + $int5), $int6, ^setpos_abs_left, ^setpos_abs_top);
cc_settext($text0);
cc_settextfont(p12_full);
cc_settextshadow(true);
cc_setcolour(0xff981f);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 15);
$int0 = calc($int0 + 10);
cc_create($component2, ^iftype_graphic, $int0);
cc_setsize(17, 17, ^setsize_abs, ^setsize_abs);
if ($int10 > 4) {
cc_setposition(calc($int3 - 46), calc($int6 + ($int4 / 2 - 8)), ^setpos_abs_left, ^setpos_abs_top);
} else {
cc_setposition(calc($int3 - 29), calc($int6 + ($int4 / 2 - 8)), ^setpos_abs_left, ^setpos_abs_top);
}
if ($int7 = 1) {
cc_setgraphic("options_radio_buttons,1");
} else {
cc_setgraphic("options_radio_buttons,2");
}
if ($int8 = 1) {
cc_sethide(true);
} else {
cc_sethide(false);
}
cc_create($component2, ^iftype_rectangle, calc($int0 + 1));
if ($int10 > 4) {
cc_setsize(calc($int3 + 17), $int4, ^setsize_abs, ^setsize_abs);
} else {
cc_setsize($int3, $int4, ^setsize_abs, ^setsize_abs);
}
cc_setposition($int5, $int6, ^setpos_abs_left, ^setpos_abs_top);
cc_settrans(255);
cc_setop(1, "Toggle setting");
if (~on_mobile = false) {
cc_setonmouseover("v2_stone_button_in_filled_free($component2, calc($int0 - 10), 0xff981f)");
} else {
cc_setonmouseover("v2_stone_button_in_filled_free($component2, calc($int0 - 10), ^white)");
}
cc_setonmouseleave("v2_stone_button_filled_free($component2, calc($int0 - 10), 0xff981f)");
return(calc($int0 + 2), calc($int1 + 1));