-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[clientscript,confirmdestroy_init].cs2
38 lines (38 loc) · 1.63 KB
/
[clientscript,confirmdestroy_init].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
// 814
[clientscript,confirmdestroy_init](obj $obj0, int $num1, string $string0, string $text1)
cc_deleteall(confirm_destroy:0);
cc_create(confirm_destroy:0, ^iftype_rectangle, 0);
.cc_create(confirm_destroy:0, ^iftype_rectangle, 1);
cc_sethide(true);
.cc_sethide(true);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
.cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
.cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
cc_create(confirm_destroy:0, ^iftype_text, 2);
cc_setsize(0, 30, ^setsize_minus, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_top);
cc_setcolour(0x800000);
cc_settextfont(q8_full);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settext($string0);
def_int $int2 = parawidth($string0, 479, q8_full);
$int2 = ~max($int2, 330);
$int2 = calc(($int2 + 57) / 2 + 5);
cc_create(confirm_destroy:0, ^iftype_graphic, 3);
.cc_create(confirm_destroy:0, ^iftype_graphic, 4);
cc_setsize(57, 13, ^setsize_abs, ^setsize_abs);
.cc_setsize(57, 13, ^setsize_abs, ^setsize_abs);
cc_setposition(calc(0 - $int2), 9, ^setpos_abs_centre, ^setpos_abs_top);
.cc_setposition($int2, 9, ^setpos_abs_centre, ^setpos_abs_top);
cc_setgraphic("sworddecor,1");
.cc_setgraphic("sworddecor,0");
if (~inzone(0_30_77_0_0, 3_30_77_63_63, coord) = 1) {
~confirmdestroy_setupbutton(confirm_destroy:1, "Yes", 1, "Yy");
} else {
~confirmdestroy_setupbutton(confirm_destroy:1, "Yes", 1, "1Yy");
}
~confirmdestroy_setupbutton(confirm_destroy:3, "No", 0, "2Nn");
if_setobject($obj0, $num1, confirm_destroy:5);
if_settext(oc_name($obj0), confirm_destroy:6);
if_settext($text1, confirm_destroy:7);