noyesbar.src 694 B
# noyesbar.src
# Sep 28 1995 - Digital Man
# $id$
# @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
printf "nbh[cb] y%s? " _question
:top
compare_str "N"
if_equal
print "h4w[No]nbh Yes "
else
print "nbh No 4w[Yes]"
end_if
getkey
print "\b\b\b\b\b\b\b\b\b\1n\1h\1>"
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