-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[clientscript,worldmap_window_drag_preview].cs2
61 lines (61 loc) · 2.27 KB
/
[clientscript,worldmap_window_drag_preview].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
// 1747
[clientscript,worldmap_window_drag_preview](int $comsubid0, int $mousex1, int $mousey2, int $x3, int $y4, component $component5, component $component6, component $component7, component $component8, int $int9)
def_int $int10 = %varcint191;
def_int $int11 = %varcint192;
def_int $int12 = %varcint193;
def_int $int13 = %varcint194;
def_int $int14 = 0;
def_int $width15 = if_getwidth($component5);
def_int $height16 = if_getheight($component5);
if (cc_find($component5, $comsubid0) = ^true) {
cc_setgraphic(null);
switch_int ($comsubid0) {
case 0 :
$int12, $int13 = calc($int12 + ($mousex1 - $x3)), calc($int13 + ($mousey2 - $y4));
case 1 :
$int11 = calc($int11 - ($mousey2 - $y4));
case 2 :
$int14 = calc($mousex1 - $x3);
$int10, $int12 = calc($int10 + $int14), calc($int12 + $int14);
case 3 :
$int10 = calc($int10 - ($mousex1 - $x3));
case 4 :
$int14 = calc($mousex1 - $x3);
$int10, $int12 = calc($int10 + $int14), calc($int12 + $int14);
$int14 = calc($mousey2 - $y4);
$int11, $int13 = calc($int11 + $int14), calc($int13 + $int14);
case 5 :
$int10 = calc($int10 - ($mousex1 - $x3));
$int14 = calc($mousey2 - $y4);
$int11, $int13 = calc($int11 + $int14), calc($int13 + $int14);
case 6 :
$int14 = calc($mousex1 - $x3);
$int10, $int12 = calc($int10 + $int14), calc($int12 + $int14);
$int11 = calc($int11 - ($mousey2 - $y4));
case 7 :
$int10 = calc($int10 - ($mousex1 - $x3));
$int11 = calc($int11 - ($mousey2 - $y4));
}
if ($int12 < 10) {
$int10 = calc($int10 - $int12);
$int12 = 0;
}
if ($int10 < calc($int12 + 10)) {
$int10 = $int12;
}
if ($int13 < 10) {
$int11 = calc($int11 - $int13);
$int13 = 0;
}
if ($int11 < calc($int13 + 10)) {
$int11 = $int13;
}
$int10 = ~max(~min($int10, calc($width15 - $int9)), 0);
$int11 = ~max(~min($int11, calc($height16 - 280)), 0);
$int12, $int13 = ~max(~min($int12, $int10), 0), ~max(~min($int13, $int11), 0);
if_setposition($int12, $int13, ^setpos_abs_left, ^setpos_abs_top, $component7);
if_setsize($int10, $int11, ^setsize_minus, ^setsize_minus, $component7);
if_sethide(false, $component7);
if_sethide(true, $component8);
cc_setontimer("worldmap_window_drag_end(calc(clientclock + 3), $int10, $int11, $int12, $int13, $component5, $component6, $component7, $component8, $int9)");
}