-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[clientscript,bankmain_dragscroll].cs2
47 lines (47 loc) · 1.42 KB
/
[clientscript,bankmain_dragscroll].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
// 284
[clientscript,bankmain_dragscroll](component $component0, int $comsubid1, int $mousex2, int $int3, component $component4, int $clock5)
if (calc($mousex2 - if_getx($component0)) < calc(51 - 10)) {
return;
}
$int3 = calc($int3 - if_gety($component0));
def_int $int6 = 5;
def_int $int7 = 0;
def_int $int8 = if_getscrolly($component0);
if ($int3 < 15) {
if ($int3 < -8) {
return;
}
if ($clock5 <= clientclock) {
if (cc_find($component0, $comsubid1) = ^true) {
cc_setondrag("bankmain_dragscroll(event_com, event_comsubid, event_mousex, event_mousey, $component4, calc(clientclock + 2))");
return;
}
} else if (calc($clock5 - clientclock) < 5) {
if (cc_find($component0, $comsubid1) = ^true) {
cc_setondrag("bankmain_dragscroll(event_com, event_comsubid, event_mousex, event_mousey, $component4, calc($clock5 + 2))");
return;
}
} else if (cc_find($component0, $comsubid1) = ^true) {
cc_setondrag("bankmain_dragscroll(event_com, event_comsubid, event_mousex, event_mousey, $component4, calc($clock5 + 1))");
}
if ($int3 < 5) {
$int6 = 8;
}
if ($int8 > $int6) {
$int8 = calc($int8 - $int6);
} else {
$int8 = 0;
}
~scrollbar_resize($component4, $component0, $int8);
} else {
$int7 = calc(if_getheight($component0) - 32 - $int3);
if ($int7 < 20) {
if ($int7 < -5) {
$int6 = 10;
} else if ($int7 < 5) {
$int6 = 8;
}
$int8 = calc($int8 + $int6);
~scrollbar_resize($component4, $component0, $int8);
}
}