TGC Codebase Backup



Best simple menu for your games (no media) by LEAF

2nd Nov 2008 9:48
Summary

A simple menu for your games.



Description



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    set text size 12
blue = RGB(0,128,255)
white = RGB(255,255,255)
selectedItem=1
do
if selectedItem=1 then ink blue,0 else ink white,0
text 300,350,"New Game"
sync
if selectedItem=2 then ink blue,0 else ink white,0
text 400,350,"Load game"
sync
if selectedItem=3 then ink blue,0 else ink white,0
text 500,350,"Options"
sync
if selectedItem=4 then ink blue,0 else ink white,0
text 600,350,"Exit"
sync

if leftkey()=1 and hold=0 then dec selectedItem : hold=1
if rightkey()=1 and hold=0 then inc selectedItem : hold=1
if leftkey()=0 and rightkey()=0 then hold=0
if selectedItem>4 then selectedItem=1
if selectedItem<1 then selectedITem=4
if selectedItem=4
end
endif
sync
loop
return