This repository was archived by the owner on Feb 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path[proc,settings_create_toggle].cs2
102 lines (102 loc) · 3.89 KB
/
[proc,settings_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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// 3846
[proc,settings_create_toggle](int $int0, int $int1, int $int2, int $int3, int $trans4, struct $struct5, component $component6, component $component7, component $component8)(int, int, int, int)
def_boolean $boolean9 = ~on_mobile;
def_string $string0 = struct_param($struct5, param_1086);
if ($boolean9 = true & string_length(struct_param($struct5, param_1087)) > 0) {
$string0 = struct_param($struct5, param_1087);
}
def_string $string1 = struct_param($struct5, param_1096);
def_int $int10 = 0;
def_int $int11 = %varbit9665;
def_boolean $boolean12 = struct_param($struct5, param_1119);
if ($boolean9 = true & string_length(struct_param($struct5, param_1097)) > 0) {
$string1 = struct_param($struct5, param_1097);
}
if (string_length($string1) > 0) {
$int10 = calc(paraheight($string1, calc(if_getwidth($component7) - 45), p12_full) * 14);
}
$int1 = calc($int1 + $int10);
if ($boolean12 = true | $int11 = 1) {
$int10 = 0;
}
def_int $setting13 = struct_param($struct5, param_1077);
def_boolean $boolean14 = struct_param($struct5, param_1085);
def_boolean $boolean15 = ~script3957($struct5);
def_boolean $boolean16 = struct_param($struct5, param_1084);
def_int $int17 = calc(paraheight($string0, calc(if_getwidth($component7) - 45), b12_full) * 14);
if ($boolean9 = true & $int17 < 20) {
$int17 = 20;
}
def_int $int18 = calc($int17 + 12 + $int10);
cc_create($component6, ^iftype_rectangle, $int3);
cc_setsize(10, $int18, ^setsize_minus, ^setsize_abs);
cc_setposition(0, $int0, ^setpos_abs_centre, ^setpos_abs_top);
cc_setfill(true);
cc_setop(1, "Toggle");
cc_setonop("settings_toggle_op($struct5, $setting13, $component7, calc($int2 + 2), $boolean16, $boolean14)");
cc_setcolour(^white);
cc_settrans(255);
if ($boolean9 = false & $int11 = 1 & string_length($string1) > 0) {
cc_setonmouserepeat("tooltip_mouserepeat($component7, $int2, $component8, $string1, 25, 190)");
cc_setonmouseleave("deltooltip($component8)");
}
$int3 = calc($int3 + 1);
cc_create($component7, ^iftype_rectangle, $int2);
cc_setsize(10, $int18, ^setsize_minus, ^setsize_abs);
cc_setposition(0, $int0, ^setpos_abs_centre, ^setpos_abs_top);
cc_setfill(true);
cc_setcolour(^black);
cc_settrans($trans4);
if ($boolean14 = true) {
~settings_toggle_choose_transmit($component7, calc($int2 + 2), $boolean16, $setting13, $struct5, $trans4);
}
if ($boolean9 = false & $boolean15 = true) {
cc_setonmouseover("cc_settrans($component7, $int2, 240, null)");
cc_setonmouseleave("cc_settrans($component7, $int2, $trans4, null)");
}
$int2 = calc($int2 + 1);
cc_create($component7, ^iftype_text, $int2);
cc_setsize(45, $int17, ^setsize_minus, ^setsize_abs);
cc_setposition(10, calc($int0 + 6), ^setpos_abs_left, ^setpos_abs_top);
cc_settext($string0);
cc_settextfont(b12_full);
cc_settextshadow(true);
if ($boolean15 = true) {
cc_setcolour(0xff981f);
} else {
cc_setcolour(0x9f9f9f);
}
cc_settextalign(^settextalign_left, ^settextalign_centre, 14);
$int2 = calc($int2 + 1);
cc_create($component7, ^iftype_graphic, $int2);
cc_setsize(18, 18, ^setsize_abs, ^setsize_abs);
cc_setposition(10, calc($int0 + ($int18 / 2 - 9)), ^setpos_abs_right, ^setpos_abs_top);
def_int $int19 = ~settings_get_toggle($setting13);
if ($boolean16 = true) {
$int19 = calc(1 - $int19);
}
if ($int19 = 1) {
if ($boolean15 = true) {
cc_setgraphic("toggle_box,1");
} else {
cc_setgraphic("toggle_box,3");
}
} else if ($boolean15 = true) {
cc_setgraphic("toggle_box,0");
} else {
cc_setgraphic("toggle_box,2");
}
$int2 = calc($int2 + 1);
if ($boolean12 = false & $int11 = 0 & $int10 > 0) {
cc_create($component7, ^iftype_text, $int2);
cc_setsize(45, $int10, ^setsize_minus, ^setsize_abs);
cc_setposition(10, calc($int17 + $int0 + 6), ^setpos_abs_left, ^setpos_abs_top);
cc_settext($string1);
cc_settextfont(p12_full);
cc_settextshadow(true);
cc_setcolour(0x9f9f9f);
cc_settextalign(^settextalign_left, ^settextalign_centre, 14);
$int2 = calc($int2 + 1);
}
$int0 = calc($int18 + $int0);
return($int0, $int1, $int2, $int3);