10 text$=" You can use this simple sc
rolling text routine in menu programs, p
ressing the SPACE-BAR will do something
Wicked!!! try it now!"
20 REM Display Menu
30 CLS:PRINT" ":PRINT" Main
Menu"
40 PRINT" ":PRINT" <1> Option 1 o
f the Menu"
50 PRINT" <2> Option 2 of the Menu"
60 PRINT" <3> Option 3 of the Menu"
70 PRINT" 80 PRINT" This is a simple menu"
90 PRINT" The text keeps on scrolli
ng"
100 PRINT" until a key is pressed"
110 VDU30
120 PROCscreen
130 A=GET
140 IF A=42 THEN PROCstar
150 DEFPROCscreen
160 PROCmove(0,22):PRINT"
,,,,,,,,,,,,,,,,,,,,,,,,,,"
170 PROCscroll(text$,0,23,39,TRUE,800)
180 REPEATUNTILADVAL(-3)=191:A=INKEY(0
)
190 GOTO 170
200 DEFPROCkeycheck
210 IF A=49 THEN CLS:PRINT"Option 1 Ch
oosen":END
220 IF A=50 THEN CLS:PRINT"Option 2 Ch
oosen":END
230 IF A=51 THEN CLS:PRINT"Option 3 Ch
oosen":END
240 ENDPROC
250 DEFPROCscroll(msg$,X%,Y%,wdth%,dir
%,wait%)
260 len%=LEN(msg$)+wdth%+1
270 FOR step%=len%*-(dir%=FALSE)TO len
%*-(dir%=TRUE) STEP -(dir%*2+1)
280 PROCmove(X%,Y%):PRINT"";MID$(STRIN
G$(wdth%," ")+msg$+" ",step%,wdth%)
290 FOR T%=1 TO wait%:NEXT
300 REPEATUNTILADVAL(-3)=191:A=INKEY(0
)
310 IF A<>-1 THEN PROCkeycheck
320 IF INKEY-99 THEN step%=step%-2
330 NEXT step%
340 ENDPROC
350 REM This routine makes the
360 REM PROCprint statement easier
370 DEFPROCmove(x%,y%)
380 xneg=0:yneg=0
390 v=?&319:hh=?&318
400 x%=x%-hh:y%=y%-v
410 IF x%<0 THEN x%=x%*-1:xneg=1
420 IF y%<0 THEN y%=y%*-1:yneg=1
430 IF xneg=0 PRINT;STRING$(x%,CHR$9);
440 IF xneg=1 PRINT;STRING$(x%,CHR$8);
450 IF yneg=0 PRINT;STRING$(y%,CHR$10)
;
460 IF yneg=1 PRINT;STRING$(y%,CHR$11)
;
470 ENDPROC