-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,mesoverlay_draw].cs2
33 lines (33 loc) · 1.36 KB
/
[proc,mesoverlay_draw].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
// 2018
[proc,mesoverlay_draw](string $string0, int $height0, component $component1, component $component2)
if_setscrollpos(0, 0, $component1);
cc_deleteall($component1);
def_int $width3 = if_getwidth($component1);
def_int $height4 = paraheight($string0, $width3, q8_full);
def_int $int5 = 16;
if ($height4 = 2) {
$int5 = 31;
} else if ($height4 = 3) {
$int5 = 24;
}
def_int $height6 = calc($height4 * $int5 + 4);
cc_create($component1, ^iftype_text, 0);
cc_setsize(0, $height6, ^setsize_minus, ^setsize_abs);
cc_setcolour(^black);
cc_settextshadow(false);
cc_settextalign(^settextalign_centre, ^settextalign_centre, $int5);
cc_settextfont(q8_full);
cc_settext($string0);
if ($height6 <= $height0) {
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
if_setscrollsize(0, 0, $component1);
cc_deleteall($component2);
if_sethide(true, $component2);
} else {
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_top);
if_setscrollsize(0, $height6, $component1);
cc_deleteall($component2);
if_sethide(false, $component2);
~scrollbar_vertical($component2, $component1, "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");
}
if_setontimer("mesoverlay_checkheight($string0, $height0, $component1, $component2)", $component1);