-
LCD menu
Need some further advice.
I'm using three buttons to provide menu selection, via a list of options on an LCD
Code:
Main:
LCDOUT $FE,2,"Night Time Settings"
lcdout $FE, $C0, "Use + key for Option"
IF !plus_butt THEN Option = option + 1
pause 150
IF option = 1 THEN lcdout $FE, $D4, "Set Number of Vivs "
if option = 2 THEN lcdout $FE, $D4, "Set Start Times "
if option = 3 THEN lcdout $FE, $D4, "Set Stop Times "
if option >3 THEN option = 0
goto main
This works fine in displaying option I want, however I would like to then goto the desired option by pressing the set button. I tried
Code:
if !set_butt AND option = 1 goto Vivs:
But that didn't work. Does anyone have any suggestions on how to get this working. I can't use "IF option = 1 goto vivs" as this would jump before options 2 and 3 could be selected...
-
You will probably need to add a statement after each selection that
sits it a loop until the button is released.
-
Thanks for the reply Charles.
I was thinking of trying the BRANCHL command, something like (syntax is probably wrong)
Code:
if !set_butt BRANCHL B4, [vivs,start,stop]
-
Might try the following:
Code:
If (option = 1) AND (!set_butt) Then goto vivs
If (option = 2) AND (!set_butt) Then goto start
If (option = 3) AND (!set_butt) Then goto stop
-
Code:
If option = 1 Then
If set_butt = 0 Then goto vivs
endif
This will take less code space and will work.
Al.