well as the thread says.
sync on
sync rate 0
backdrop on
color backdrop 0
a = 255
b = 100
c = 100
choice = 1
leftkeypressed = 0
rightkeypressed = 0
`-------------------- Select screen -------------------------------
do
`if key e pressed
if keystate(18) = 1
if keypressed = 0
choice = 3
endif
endif
`if key l pressed
if keystate(38) = 1
if keypressed = 0
choice = 2
endif
endif
`if key n is pressed
if keystate(49) = 1
if keypressed = 0
choice = 1
endif
endif
`cycle through next option and update choice
if rightkey() = 1
if keypressed = 0
inc choice, 1
if choice > 3 then choice = 1
endif
else
leftkeypressed = 0
endif
`cycle through previous option and update choice
if leftkey() = 1
if keypressed = 0
dec choice, 1
if choice < 1 then choice = 3
endif
else
rightkeypressed = 0
endif
`set colors for print options
select choice
case 1 : a = 255 : b = 100 : c = 100 : selected$ = "new game highlighted" : endcase
case 2 : a = 100 : b = 255 : c = 100 : selected$ = "load game highlighted" : endcase
case 3 : a = 100 : b = 100 : c = 255 : selected$ = "exit game highlighted" : endcase
case default : a = a : b = b : c = c : selected$ = selected$ : endcase
endselect
`pressing enter prints the selected option
if keystate(28) = 1
if choice = 3 then end
selected$ = "exit was selected"
endif
if choice = 2, if keystate(38) = 1
filename$ = "currentsave.save"
open to read 1,filename$
rem read floats ------
read float 1,savedata1#
read float 1,savedata2#
read float 1,savedata3#
position object 1,savedata1#,savedata2#,savedata3#
close file 1
endif
selected$ = "load game was selected"
endif
if choice = 1
selected$ = "new game was selected"
endif
`reset keypressed
if scancode() = 0
keypressed = 0
else
keypressed = 1
ink rgb(255,255,255), 0
set cursor 5,5
print selected$
endif
`print options
ink rgb(a,a,a),0 : center text 200, 400, "[N]ew Game"
ink rgb(b,b,b),0 : center text 330, 400, "[L]oad Game"
ink rgb(c,c,c),0 : center text 450, 400, "[E]xit Game"
sync
loop
Chaos Games