-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[clientscript,tackle_box_dragitem].cs2
36 lines (36 loc) · 1.23 KB
/
[clientscript,tackle_box_dragitem].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
// 4058
[clientscript,tackle_box_dragitem](component $component0, int $comsubid1, component $component2, int $mousey3, int $clock4)
def_int $int5 = 5;
def_int $int6 = 0;
def_int $int7 = if_getscrolly($component0);
if (calc($mousey3 - $int7) < 15) {
if ($clock4 <= clientclock) {
if (cc_find($component0, $comsubid1) = ^true) {
cc_setondrag("tackle_box_dragitem(event_com, event_comsubid, $component2, event_mousey, calc(clientclock + 2))");
return;
}
} else if (calc($clock4 - clientclock) < 5) {
if (cc_find($component0, $comsubid1) = ^true) {
cc_setondrag("tackle_box_dragitem(event_com, event_comsubid, $component2, event_mousey, calc($clock4 + 2))");
return;
}
} else if (cc_find($component0, $comsubid1) = ^true) {
cc_setondrag("tackle_box_dragitem(event_com, event_comsubid, $component2, event_mousey, calc($clock4 + 1))");
}
if (calc($mousey3 - $int7) < 5) {
$int5 = 8;
}
$int7 = ~max(0, calc($int7 - $int5));
~scrollbar_resize($component2, $component0, $int7);
} else {
$int6 = calc(if_getheight($component0) - 32 - $mousey3);
if ($int6 < 20) {
if ($int6 < -5) {
$int5 = 10;
} else if ($int6 < 5) {
$int5 = 8;
}
$int7 = calc($int7 + $int5);
~scrollbar_resize($component2, $component0, $int7);
}
}