-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[clientscript,longscroll_setup].cs2
30 lines (30 loc) · 1.56 KB
/
[clientscript,longscroll_setup].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
// 418
[clientscript,longscroll_setup](string $string0, string $string1)
def_component $component0 = interface_625:4;
def_component $component1 = interface_625:7;
def_component $component2 = interface_625:5;
def_component $component3 = interface_625:6;
def_int $int4 = 0;
if (string_length($string0) = 0) {
$int4 = 1;
}
def_int $height5 = calc(paraheight($string1, if_getwidth($component1), q8_full) * 15 + 10);
if_settext($string1, $component1);
if_setscrollsize(0, $height5, $component2);
if_setsize(if_getwidth($component1), $height5, ^setsize_abs, ^setsize_abs, $component1);
if_setscrollpos(0, 0, $component2);
if ($int4 = 1) {
if_sethide(true, $component0);
if_setsize(16, 266, ^setsize_abs, ^setsize_abs, $component3);
if_setposition(84, -1, ^setpos_abs_right, ^setpos_abs_centre, $component3);
if_setsize(if_getwidth($component2), 266, ^setsize_abs, ^setsize_abs, $component2);
if_setposition(-19, -1, ^setpos_abs_centre, ^setpos_abs_centre, $component2);
} else {
if_settext($string0, $component0);
if_sethide(false, $component0);
if_setsize(16, 244, ^setsize_abs, ^setsize_abs, $component3);
if_setposition(84, 55, ^setpos_abs_right, ^setpos_abs_top, $component3);
if_setsize(if_getwidth($component2), 244, ^setsize_abs, ^setsize_abs, $component2);
if_setposition(-19, 10, ^setpos_abs_centre, ^setpos_abs_centre, $component2);
}
~scrollbar_vertical($component3, $component2, "scrollbar_parchment_dragger_v2,3", "scrollbar_parchment_dragger_v2,0", "scrollbar_parchment_dragger_v2,1", "scrollbar_parchment_dragger_v2,2", "scrollbar_parchment_v2,0", "scrollbar_parchment_v2,1");