well paste a button on the screen. Let suppose the X-coordinates of the button start in 250 and end 300, and Y-coordinates start 100 and end 200, do this
do
if mousey()=>100 and mousey()=<200 and mousex()=>250 and mousex()=<250 and mouseclick()=1 then goto somewhere
loop
This is a code I made for a menu
start:
sync on : sync rate 0
CIRCLE 4,4,4
FOR Y=1 TO 7
FOR X=1 TO 7
DOT X,Y
NEXT Y : NEXT X
GET IMAGE 2,0,0,13,10
x=223
y=200
SPRITE 4,X,Y,2
DO
CLS
show sprite 4
IF UPKEY()=1 THEN SPRITE 4,X,Y-1,2 : Y=Y-20
IF DOWNKEY()=1 THEN SPRITE 4,X,Y+1,2 : Y=Y+20
IF Y=<200 THEN Y=200
IF Y=>220 THEN Y=220
IF Y=200 AND RETURNKEY()=1 THEN GOTO 1VS2
IF Y=220 AND RETURNKEY()=1 THEN GOTO 1VSCOM
TEXT 250,200,"1P VS 2P"
TEXT 250,220,"1P VS COM"
SYNC
loop
1vs2:
hide sprite 4
do
cls
print "this is the 1 vs 2 mode"
print "press spacekey to return"
if spacekey()=1 then goto start
sync
loop
1vscom:
hide sprite 4
do
cls
Print "this is the 1vs com mode"
print "press spacekey to return"
if spacekey()=1 then goto start
sync
loop
CURRENT PROJECT: RETRO PAC-MAN