-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,pattern_cards_confirm_update].cs2
44 lines (44 loc) · 1.36 KB
/
[proc,pattern_cards_confirm_update].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
// 345
[proc,pattern_cards_confirm_update](component $component0)
def_int $int1 = -1;
def_int $int2 = -1;
def_int $int3 = -1;
def_int $int4 = 0;
while ($int4 < 15) {
if (testbit(%varbit9756, $int4) = ^true) {
if ($int1 = -1) {
$int1 = $int4;
} else if ($int2 = -1) {
$int2 = $int4;
} else if ($int3 = -1) {
$int3 = $int4;
} else {
~clan_stonebutton_draw(true, "<col=9f9f9f>Too many cards!</col>", "p11_full", $component0);
if_setonmouserepeat(null, $component0);
if_setonmouseleave(null, $component0);
if_setonop(null, $component0);
if_setontimer(null, $component0);
if_clearops($component0);
return;
}
}
$int4 = calc($int4 + 1);
}
if ($int3 = -1) {
if ($int1 = -1) {
~clan_stonebutton_draw(true, "<col=9f9f9f>Select 3 more</col>", "p11_full", $component0);
} else if ($int2 = -1) {
~clan_stonebutton_draw(true, "<col=9f9f9f>Select 2 more</col>", "p11_full", $component0);
} else {
~clan_stonebutton_draw(true, "<col=9f9f9f>Select 1 more</col>", "p11_full", $component0);
}
if_setonmouserepeat(null, $component0);
if_setonmouseleave(null, $component0);
if_setonop(null, $component0);
if_setontimer(null, $component0);
if_clearops($component0);
return;
}
~clan_stonebutton_init("Confirm", $component0, "p12_full");
if_setonop("pattern_cards_confirm_op(event_opindex, $component0)", $component0);
if_setontimer(null, $component0);