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,scrollbar_horizontal].cs2
57 lines (57 loc) · 2.5 KB
/
[proc,scrollbar_horizontal].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
// 6156
[proc,scrollbar_horizontal](component $component0, component $component1, graphic $graphic2, graphic $graphic3, graphic $graphic4, graphic $graphic5, graphic $graphic6, graphic $graphic7, int $int8)
cc_create($component0, ^iftype_graphic, 0);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setsize(32, 0, ^setsize_minus, ^setsize_minus);
cc_setgraphic($graphic2);
cc_settiling(false);
cc_setonclick("scrollbar_horizontal_jump($component0, $component1, event_mousex)");
cc_setonscrollwheel("scrollbar_horizontal_wheel($component0, $component1, event_mousey)");
cc_setnoclickthrough(true);
.cc_create($component0, ^iftype_graphic, 1);
.cc_setposition(0, 16, ^setpos_abs_left, ^setpos_abs_centre);
def_int $width9 = if_getscrollwidth($component1);
if ($width9 <= 0) {
$width9 = if_getwidth($component1);
}
def_int $int10 = 0;
if ($width9 > 0) {
$int10 = calc((if_getwidth($component0) - 32) * if_getwidth($component1) / $width9);
} else {
$int10 = calc(if_getwidth($component0) - 32);
}
$int10 = ~max(10, $int10);
.cc_setsize(0, $int10, ^setsize_minus, ^setsize_abs);
.cc_setgraphic($graphic4);
.cc_settiling(false);
.cc_setdraggable($component0, 0);
.cc_setondrag("scrollbar_horizontal_drag($component0, $component1, event_mousex, false)");
.cc_setondragcomplete("scrollbar_horizontal_drag($component0, $component1, event_mousex, true)");
.cc_setdraggablebehavior(1);
cc_create($component0, ^iftype_graphic, 2);
cc_setposition(.cc_getx, 0, ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize(5, 0, ^setsize_abs, ^setsize_minus);
cc_setgraphic($graphic3);
cc_settiling(false);
cc_create($component0, ^iftype_graphic, 3);
cc_setposition(calc(.cc_getx + .cc_getwidth - 5), 0, ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize(5, 0, ^setsize_abs, ^setsize_minus);
cc_setgraphic($graphic5);
cc_settiling(false);
cc_create($component0, ^iftype_graphic, 4);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize(16, 0, ^setsize_abs, ^setsize_minus);
cc_setgraphic($graphic6);
cc_settiling(false);
cc_setonhold("scrollbar_horizontal_hold($component0, $component1, -4)");
cc_setnoclickthrough(true);
cc_create($component0, ^iftype_graphic, 5);
cc_setposition(0, 0, ^setpos_abs_right, ^setpos_abs_centre);
cc_setsize(16, 0, ^setsize_abs, ^setsize_minus);
cc_setgraphic($graphic7);
cc_settiling(false);
cc_setonhold("scrollbar_horizontal_hold($component0, $component1, 4)");
cc_setnoclickthrough(true);
if ($int8 = 1) {
if_setonscrollwheel("scrollbar_horizontal_wheel($component0, $component1, event_mousey)", $component1);
}