-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnoyesbar.src
79 lines (69 loc) · 1.16 KB
/
noyesbar.src
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# noyesbar.src
# Sep 28 1995 - Digital Man
# $Id: noyesbar.src,v 1.11 2020/04/06 02:57:19 rswindell Exp $
# @format.tab-size 8, @format.use-tabs true
!include sbbsdefs.inc # _question
str tmp
copy tmp str
setstr "N"
compare_strn 2 _question "\r\n"
if_true
crlf
shift_str _question 2
end_if
compare_strn 2 _question "\1?"
if_true
print "\1?"
shift_str _question 2
end_if
print "\x01n\x01b\x01h[\x01c@CHECKMARK@\x01b] \x01y@QUESTION->@? "
:top
compare_str "N"
if_equal
print "\x01h\x014\x01w\x01e[No]\x01n\x01b\x01h Yes "
else
print "\x01n\x01b\x01h No \x014\x01w\x01e[Yes]"
end_if
int aborted
copy aborted _sys_status
and aborted SS_ABORT
compare aborted SS_ABORT
if_not_equal
getkey
print "\b\b\b\b\b\b\b\b\b\1n\1h\1>"
int aborted
copy aborted _sys_status
and aborted SS_ABORT
compare aborted SS_ABORT
if_equal
return
end_if
end_if
if_equal
return
end_if
compare_key ^M
if_true
ungetstr
copy str tmp
return
end_if
compare_keys "YN"
if_true
ungetkey
copy str tmp
return
end_if
compare_key ^@
if_true
copy str tmp
return
end_if
# Toggle
compare_str "Y"
if_true
setstr "N"
else
setstr "Y"
end_if
goto top