I have made this code for a menu system i am making but can't get the options sub menu to work can someone please tell me why?
Thanx
`Set display resolution and color depth
set display mode 1024,768,32
`Settings
sync on
sync rate 0
`Load buttons
load image "ng.tga",1,1
load image "op.tga",2,1
load image "mp.tga",3,1
load image "cr.tga",4,1
load image "ex.tga",5,1
`Background
load image "Apollo-Design.bmp",6,1
`Load mouseover buttons
load image "ngo.tga",7,1
load image "opo.tga",8,1
load image "mpo.tga",9,1
load image "cro.tga",10,1
load image "exo.tga",11,1
`Apollo Design image
load image "apd.tga",12,1
`Position background
sprite 6,1,1,6
`Turn transparency off
set sprite 6,0,0
`Main Menu
main:
`Position buttons
sprite 1,300,150,1
sprite 2,300,250,2
sprite 3,300,350,3
sprite 4,300,450,4
sprite 5,300,550,5
`Position mouseover buttons
sprite 7,300,150,7
sprite 8,300,250,8
sprite 9,300,350,9
sprite 10,300,450,10
sprite 11,300,550,11
`Position Apollo Design image
sprite 12,1,740,12
`Start loop
do
if mousex()>300 and mousex()<700 and mousey()>150 and mousey()<250 and mouseclick()=1 then gosub options
`Hide sprites so not visible until mouse over
hide sprite 7
hide sprite 8
hide sprite 9
hide sprite 10
hide sprite 11
`Show mouseover buttons
if mousex()>300 and mousex()<700 and mousey()>150 and mousey()<250 then show sprite 7
if mousex()>300 and mousex()<700 and mousey()>250 and mousey()<350 then show sprite 8
if mousex()>300 and mousex()<700 and mousey()>350 and mousey()<450 then show sprite 9
if mousex()>300 and mousex()<700 and mousey()>450 and mousey()<550 then show sprite 10
if mousex()>300 and mousex()<700 and mousey()>550 and mousey()<650 then show sprite 11
`Refresh screen
sync
loop
options:
cls
load image "op.tga",2,1
load image "opo.tga",8,1
sprite 1,300,150,1
sync
suspend for key
