-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,toplevel_resize].cs2
129 lines (129 loc) · 5.11 KB
/
[proc,toplevel_resize].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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
// 909
[proc,toplevel_resize](component $component0, enum $enum1)
def_component $component2 = enum(component, component, $enum1, interface_161:2);
def_component $component3 = enum(component, component, $enum1, interface_161:17);
def_component $component4 = enum(component, component, $enum1, interface_161:9);
def_component $component5 = enum(component, component, $enum1, interface_161:19);
def_int $int6 = enum(enum, int, enum_1960, $enum1);
def_int $int7 = enum(enum, int, enum_1961, $enum1);
def_int $int8 = enum(enum, int, enum_1135, $enum1);
def_int $int9 = enum(enum, int, enum_1136, $enum1);
def_int $int10 = 0;
def_int $int11 = 0;
def_int $int12 = 0;
def_int $int13 = 0;
def_int $int14 = 0;
def_int $int15 = 0;
def_int $width16 = if_getwidth($component0);
def_int $height17 = if_getheight($component0);
if ($enum1 = enum_1745) {
$int14 = ~max(0, calc($width16 - if_getwidth(interface_601:19)));
$int15 = ~max(0, calc($height17 - if_getheight(interface_601:19)));
}
if (%varbit4606 ! 0) {
if (%varbit4606 = 2) {
viewport_setfov(512, 220);
viewport_clampfov(0, 0, 0, 0);
} else if (%varbit4606 = 3) {
viewport_setfov(256, 256);
if ($enum1 = enum_1129) {
viewport_clampfov(512, 512, 512, 512);
} else {
viewport_clampfov(640, 768, 512, 512);
}
} else {
viewport_setfov(256, 256);
viewport_clampfov(512, 512, 512, 512);
}
cam_setfollowheight(50);
if ($component2 ! null & $component3 ! null) {
$int10, $int11 = viewport_geteffectivesize;
$int12, $int13 = ~max(0, calc($width16 - $int10)), ~max(0, calc($height17 - $int11));
if_setsize($int10, $int11, ^setsize_abs, ^setsize_abs, $component2);
if_setsize(calc($int10 - ~max(0, $int14 - $int12)), calc($int11 - ~max(0, $int15 - $int13)), ^setsize_abs, ^setsize_abs, $component3);
if ($component4 ! null & $component5 ! null) {
$int12, $int13 = calc(($int12 - $int14) / 2), calc(($int13 - $int15) / 2);
$int6, $int8 = ~max(0, calc($int6 - $int12)), ~max(0, calc($int8 - $int12));
$int7, $int9 = ~max(0, calc($int7 - $int13)), ~max(0, calc($int9 - $int13));
if_setposition($int6, $int7, ^setpos_abs_left, ^setpos_abs_top, $component4);
if_setposition($int6, $int7, ^setpos_abs_left, ^setpos_abs_top, $component5);
if_setsize(calc($int6 + $int8), calc($int7 + $int9), ^setsize_minus, ^setsize_minus, $component4);
if_setsize(calc($int6 + $int8), calc($int7 + $int9), ^setsize_minus, ^setsize_minus, $component5);
~toplevel_mainmodal_bg_calculate($enum1, enum(component, component, $enum1, interface_161:18), $component5, $int8, $int9);
} else {
~toplevel_mainmodal_bg_calculate($enum1, enum(component, component, $enum1, interface_161:18), $component3, 0, 0);
}
}
} else {
viewport_clampfov(0, 0, 0, 0);
if (%varcint73 >= 128 & %varcint73 <= 896 & %varcint74 >= 128 & %varcint74 <= 896) {
~camera_do_zoom(%varcint73, %varcint74);
} else {
~camera_do_zoom(512, 512);
}
$int10, $int11 = viewport_geteffectivesize;
if ($component2 ! null & $component3 ! null) {
if_setsize($int10, $int11, ^setsize_abs, ^setsize_abs, $component2);
if_setsize(calc($int10 - $int14), calc($int11 - $int15), ^setsize_abs, ^setsize_abs, $component3);
if ($component4 ! null & $component5 ! null) {
if_setposition($int6, $int7, ^setpos_abs_left, ^setpos_abs_top, $component4);
if_setposition($int6, $int7, ^setpos_abs_left, ^setpos_abs_top, $component5);
if_setsize(calc($int6 + $int8), calc($int7 + $int9), ^setsize_minus, ^setsize_minus, $component4);
if_setsize(calc($int6 + $int8), calc($int7 + $int9), ^setsize_minus, ^setsize_minus, $component5);
~toplevel_mainmodal_bg_calculate($enum1, enum(component, component, $enum1, interface_161:18), $component5, $int8, $int9);
} else {
~toplevel_mainmodal_bg_calculate($enum1, enum(component, component, $enum1, interface_161:18), $component3, 0, 0);
}
}
}
def_component $component18 = enum(component, component, $enum1, interface_161:20);
if ($component18 ! null) {
if (~on_mobile = false & if_hassub($component18) = true) {
if (%varcint173 = -2) {
if_setsize(512, 0, ^setsize_abs, ^setsize_minus, $component18);
} else if (%varcint173 = -3) {
if_setsize(0, 0, ^setsize_minus, ^setsize_minus, $component18);
} else {
if_setsize(512, 334, ^setsize_abs, ^setsize_abs, $component18);
}
} else {
if_setsize(512, 334, ^setsize_abs, ^setsize_abs, $component18);
}
}
$component18 = enum(component, component, $enum1, interface_161:22);
def_int $x19 = 0;
def_int $y20 = 0;
if ($component18 ! null) {
if (if_hassub(enum(component, component, $enum1, interface_161:11)) = true) {
if (%varbit4692 ! 0) {
$y20 = 0;
} else {
$y20 = 38;
}
}
if (~on_mobile = true & %varbit542 = 0) {
if (%varbit6254 = 0) {
$x19 = calc(182 + 4);
} else {
$x19 = calc(120 + 4);
}
} else {
$x19 = 0;
}
if_setposition($x19, $y20, ^setpos_abs_right, ^setpos_abs_top, $component18);
}
$component18 = enum(component, component, $enum1, interface_161:11);
$x19 = 0;
if ($component18 ! null) {
if (~on_mobile = true) {
if (%varbit6254 = 0) {
$x19 = 182;
} else {
$x19 = 120;
}
} else {
$x19 = 0;
}
if_setsize($x19, 0, ^setsize_minus, ^setsize_minus, $component18);
}
~toplevel_resize_customise($component0, $enum1);