This is some old code from the age of the dinosaurs, it's very basic one, the real one is far better.However it's impossible to show you the real working code because i have no time to rip it out from my project.
sync on : sync rate 60
set display mode 1280,1024,32
set window off
backdrop on
set image colorkey 255,255,0
disable escapekey
disable systemkeys
for menus = 1 to 4
load image "BTN_"+str$(menus)+".png",menus+200
make object plain menus+200,250,50
texture object menus+200,menus+200
set object menus+200,1,1,0,1,0
position object menus+200,0,200+(menus*60),1000
scale object menus+200,100,100,10
next menus
`make object cube 1,10
`position object 1,0,0,0
`make camera 1
`position camera 1,0,0,-100
`point camera 1,0,0,0
menu:
do
if menus_hidden = 1
menus_hidden = 0
for menus = 1 to 4
show object menus+200
next menus
endif
selected_menu = pick object (mousex(),mousey(),201,204)
if selected_menu>0
ghost object on selected_menu
endif
if selected_menu=0
for ghost=1 to 4
ghost object off ghost+200
next ghost
endif
if mouseclick()=1 and selected_menu = 204
`start game
goto main
endif
if mouseclick()=1 and selected_menu = 203
`highscore table
endif
if mouseclick()=1 and selected_menu = 202
`options
endif
if mouseclick()=1 and selected_menu = 201
`quit
end
endif
if KEYSTATE(1)=1 and esc_press = 0
esc_press = 1
menus_hidden = 1
for menus = 1 to 4
hide object menus+200
next menus
goto main
endif
if KEYSTATE(1)= 0
esc_press = 0
endif
sync
loop
main:
do
`text 0,0,"menu = "+str$(0)
`text 0,20,"y = "+str$(y)
`y = wrapvalue(y+1)
`rotate object 1,0,y,0
`if y = 0 then goto menu
if KEYSTATE(1)=1 and esc_press = 0
esc_press = 1
menus_hidden = 0
for menus = 1 to 4
show object menus+200
next menus
goto menu
endif
if KEYSTATE(1)= 0
esc_press = 0
endif
sync
loop
Coding is My Kung Fu!
And My Kung Fu is better than Yours!