k im gonna do it menu based
the only thing i dont get, is when i press down more than 5 times it keeps going further down, even though there are no words to highlight. If i press up more than 5 times, then it rescrolls back to the bottom one. Any suggestions for the down key?
Main_Menu:
Set Text Font "Times New Roman"
` Goto Game Over if the Game is Over
` Flag to Exit the Main Menu
ExitMenu=0
` Highlight = 1-3, the Location on the Menu
Highlight=1
SW=Screen Width(): SH=Screen Height()
set text size 80
ink rgb(155,0,0),0: center text SW/2,SH/9,"X"
ink rgb(255,0,0),0: center text SW/2-3,SH/9-3,"X"
set text size 30
ink rgb(0,0,255),0
center text SW/2,SH*.5,"Single"
center text SW/2,SH*.55,"Vs"
center text SW/2,SH*.60,"Controls"
center text SW/2,SH*.65,"Option"
center text SW/2,SH*.7,"Leave"
ink rgb(255,255,255),0: center text SW/2-2,SH*.5-2,"Single"
Repeat
If Returnkey()
If Highlight=5
End
Else
ExitMenu=1
Endif
Endif
If ScanCode()
Ink 0,0: Box 0,170,SW,SH
set text size 30: ink rgb(0,0,255),0
center text SW/2,SH*.5,"Single"
center text SW/2,SH*.55,"Vs"
center text SW/2,SH*.60,"Controls"
center text SW/2,SH*.65,"Option"
center text SW/2,SH*.7,"Leave"
if downkey()=1 Then Inc Highlight: If Highlight=0 Then Highlight=5
if upkey()=1 Then Dec Highlight: If Highlight=0 Then Highlight=5
ink rgb(200,0,0),0
Select Highlight
Case 1
center text SW/2-2,SH*.5-2,"Single"
NumPlayers=1
EndCase
Case 2
center text SW/2-2,SH*.55-2,"VS"
NumPlayers=2
EndCase
Case 3
center text SW/2-2,SH*.6-2,"Control"
EndCase
Case 4
center text SW/2-2, SH*.65-2,"Option"
EndCase
Case 5
center text SW/2-2, SH*.7-2,"Leave"
EndCase
EndSelect
Repeat
Until ScanCode()=0
Endif
Sync
Until ExitMenu=1
Return