-
Notifications
You must be signed in to change notification settings - Fork 11
/
[proc,snapshot_rules_write].cs2
42 lines (42 loc) · 1.62 KB
/
[proc,snapshot_rules_write].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
// 1121
[proc,snapshot_rules_write](int $int0, string $text0, int $int1, int $int2, component $component3, int $int4, int $int5, int $int6, int $int7)(int, int, int)
def_int $int8 = calc(if_getwidth($component3) / 2);
if ($int2 = 1) {
$int8 = calc($int8 + 15);
} else {
$int8 = calc($int8 - 15);
}
cc_create($component3, ^iftype_rectangle, $int4);
$int4 = calc($int4 + 1);
cc_setsize($int8, $int7, ^setsize_abs, ^setsize_abs);
if ($int2 = 1) {
cc_setposition(0, $int6, ^setpos_abs_right, ^setpos_abs_top);
$int6 = calc($int6 + $int7);
} else {
cc_setposition(0, $int5, ^setpos_abs_left, ^setpos_abs_top);
$int5 = calc($int5 + $int7);
}
cc_settrans(255);
cc_setop(1, "Send report");
cc_setonop("snapshot_rules_send($int1)");
cc_setonmouseover("snapshot_rules_hover(event_com, event_comsubid, ^red)");
cc_setonmouseleave("snapshot_rules_hover(event_com, event_comsubid, ^white)");
.cc_create($component3, ^iftype_text, $int4);
$int4 = calc($int4 + 1);
.cc_setsize(15, $int7, ^setsize_abs, ^setsize_abs);
.cc_setposition(cc_getx, cc_gety, ^setpos_abs_left, ^setpos_abs_top);
.cc_setcolour(^white);
.cc_settextfont(p11_full);
.cc_settextalign(^settextalign_right, ^settextalign_centre, 0);
.cc_settextshadow(true);
.cc_settext("<tostring($int0)>:");
.cc_create($component3, ^iftype_text, $int4);
$int4 = calc($int4 + 1);
.cc_setsize(calc($int8 - 20), $int7, ^setsize_abs, ^setsize_abs);
.cc_setposition(calc(cc_getx + 20), cc_gety, ^setpos_abs_left, ^setpos_abs_top);
.cc_setcolour(^white);
.cc_settextfont(p11_full);
.cc_settextalign(^settextalign_left, ^settextalign_centre, 0);
.cc_settextshadow(true);
.cc_settext($text0);
return($int4, $int5, $int6);