Here's a function you can use to create a button:
FUNCTION button(PosX,PosY,Width,Height)
box PosX,PosY,PosX+Width,PosY+Height
if mousex()>PosX and mousex()<PosX+Width and mousey()>PosY and mousey()<PosY+Height
button_clicked=1
else
button_clicked=0
endif
ENDFUNCTION button_clicked
Here's some example code using the function:
do
a=button(10,10,60,10)
set cursor 0,0:print a:cls
loop
FUNCTION button(PosX,PosY,Width,Height)
box PosX,PosY,PosX+Width,PosY+Height
if mousex()>PosX and mousex()<PosX+Width and mousey()>PosY and mousey()<PosY+Height
button_clicked=1
else
button_clicked=0
endif
ENDFUNCTION button_clicked
Hope that helped
-Duke
Your signature has been erased by a mod