Cheers for the diffrent ways to detected sprites but I am not using them yet, as this drawing boxes on the screen and using the mouse box checking system.
I am making drop down menu system, so what I had in the post above works ok if I only have one to check, however I have upto 8 I wish to check, this means that if I click menu 1 it drops down with its choices then if I click on menu 5 , menu 1 will close up and menu 5 open.
ok here's the code so far
rem Standard Setup Code
sync on : sync rate 0 :
color backdrop rgb(0,0,128)
rem hide mouse
set text font "arial" : set text size 12
` set text transparent
dim menu$(8,20)
dim ts$(8)
dim tl(8)
menu$(0,1)="Frame Title"
rem menu 1 list
menu$(1,1)="File " :rem title
menu$(1,2)="New File " :rem sub items
menu$(1,3)="Save file"
menu$(1,4)="Save As.."
menu$(1,5)="Exit "
rem menu 2 list
menu$(2,1)="Edit "
menu$(2,2)="Undo "
menu$(2,3)="Cut "
menu$(2,4)="Copy "
rem menu 3 list
menu$(3,1)="Search "
menu$(4,1)="View "
menu$(5,1)="Options "
menu$(6,1)="Tools "
menu$(7,1)="Window "
menu$(8,1)="Help "
sw=screen width()
sh=screen height()
th=text height("1")
tw=text width("1")
sp=(screen width()/8)/tw
dl=th*12
click=0
do
cls
box 0,0,sw,th+4,RGB(0,0,255),RGB(0,0,255),RGB(255,255,255),RGB(255,255,255)
text tw,0,menu$(0,1)
box 0,th,sw,th*2+4,RGB(0,135,225),RGB(0,135,235),RGB(0,135,255),RGB(0,135,255)
ink RGB(255,255,255),0
ts$(1)=menu$(1,1)+space$(sp-len(menu$(1,1)))
ts$(2)=menu$(2,1)+space$(sp-len(menu$(2,1)))
ts$(3)=menu$(3,1)+space$(sp-len(menu$(3,1)))
ts$(4)=menu$(4,1)+space$(sp-len(menu$(4,1)))
ts$(5)=menu$(5,1)+space$(sp-len(menu$(5,1)))
ts$(6)=menu$(6,1)+space$(sp-len(menu$(6,1)))
ts$(7)=menu$(7,1)+space$(sp-len(menu$(7,1)))
ts$(8)=menu$(8,1)+space$(sp-len(menu$(8,1)))
if t<8
for t=1 to 8
ts$=ts$+ts$(t)
tl(t)=len(ts$(t))
next t
endif
text tw,th+2,ts$
set cursor 0,60
print str$(mousex())+" "+str$(mousey())
if mousex()>0 and mousex()<20 and mousey()>0 and mousey()<15
if mouseclick()
click=1-click
ms=1
repeat
until mouseclick()=0
endif
endif
if mousex()>55 and mousex()<100 and mousey()>0 and mousey()<15
if mouseclick()
click2=1-click2
ms=2
repeat
until mouseclick()=0
endif
endif
if click=1
ms=1
repeat
box tw,th*2+4,th*6,dl,RGB(0,0,255),RGB(0,0,255),RGB(255,255,255),RGB(255,255,255)
for tt=2 to 4
ink RGB(255,255,255),0
text tw,th*2+4+(tt-2)*th,menu$(ms,tt)
next tt
if mousex()>tw and mousex()<tw*len(menu$(ms,2)) and mousey()>th and mousey()<th+th
col=col-1
ink RGB(0,255,0),0
text tw,th*2+4,menu$(ms,2)
endif
if mousex()>tw and mousex()<tw*len(menu$(ms,3)) and mousey()>th*2 and mousey()<th*3
col=col-1
ink RGB(0,255,0),0
text tw,th*2+4,menu$(ms,3)
endif
sync
until mouseclick()=1
endif
if click2=1
ms=2
repeat
box 55,th*2+4,105,th*6,RGB(0,0,255),RGB(0,0,255),RGB(255,255,255),RGB(255,255,255)
for tt=2 to 4
ink RGB(255,255,255),0
text tw*11,th*2+4+(tt-2)*th,menu$(ms,tt)
next tt
if mousex()>tw and mousex()<tw*len(menu$(ms,2)) and mousey()>th and mousey()<th+th
col=col-1
ink RGB(0,255,0),0
text 55,th*2+4,menu$(ms,2)
endif
if mousex()>tw and mousex()<tw*len(menu$(ms,3)) and mousey()>th*2 and mousey()<th*3
col=col-1
ink RGB(0,255,0),0
text 55,th*2+4,menu$(ms,3)
endif
sync
until mouseclick()=1
endif
sync
loop
In Space No One can Hear You Scream! (When your comm Line is cut?)