Add timeout to boot menu.

Submitted by:	W Gerald Hicks <wghicks@bellsouth.net>
This commit is contained in:
Andrzej Bialecki 1998-12-31 14:06:30 +00:00
parent 8f1e6e6e22
commit 21d956c544

View File

@ -1,7 +1,7 @@
\ Simple greeting screen, presenting basic options. \ Simple greeting screen, presenting basic options.
\ XXX This is far too trivial - I don't have time now to think \ XXX This is far too trivial - I don't have time now to think
\ XXX about something more fancy... :-/ \ XXX about something more fancy... :-/
\ $Id$ \ $Id: menu.4th,v 1.1 1998/12/22 12:15:45 abial Exp $
: title : title
f_single f_single
@ -22,11 +22,33 @@
me me
; ;
: tkey ( d -- flag | char )
seconds +
begin 1 while
dup seconds u< if
drop
-1
exit
then
key? if
drop
key
exit
then
repeat
;
: prompt : prompt
14 fg 14 fg
20 11 at-xy 20 11 at-xy
." Enter your option (1,2,3): " ." Enter your option (1,2,3): "
key 10 tkey
dup 32 = if
drop key
then
dup 0< if
drop 49
then
dup emit dup emit
me me
; ;