Hey this is a little code i wrote to help beginners with their interfaces. Note that it only works in if its included in a program loop.
function lbutton(x,y,label$)
ink rgb(20,60,20),0
box x,y,x+80,y+20
set text font "Times new roman"
set text size 18
if isbetween(mousex(),x,x+80)
if isbetween(mousey(),y,y+20)
mouseover=1
if mouseclick()=1 then bpushed=1
endif
sync
endif
if mouseover=1 then ink rgb(80,40,40),0 else ink rgb(60,20,20),0
center text x+40,y,label$
endfunction bpushed
now if you paste that at the bottom of your program or even better, if you have dba pro then create an include file by going to files and add new. Then you use lbutton(xcoordinate,ycoordinate,"button label") !in an if condition only!
eg if lbutton(300,300,"push me")=1 then print "oh yeah". Hope you like it i dont normally give programs away.
eg
sync on
sync rate 30
do
cls
if lbutton(300,300,"push me")=1
print "oh yeah"
suspend for key
sync
endif
sync
loop
function lbutton(x,y,label$)
ink rgb(20,60,20),0
box x,y,x+80,y+20
set text font "Times new roman"
set text size 18
if isbetween(mousex(),x,x+80)
if isbetween(mousey(),y,y+20)
mouseover=1
if mouseclick()=1 then bpushed=1
endif
endif
if mouseover=1 then ink rgb(80,40,40),0 else ink rgb(60,20,20),0
center text x+40,y,label$
endfunction bpushed
edit
ooops forgot you#ll need this function aswell
function isbetween(a,x,y)
if a>(x-1)
if a<(y+1)
between=1
endif
endif
endfunction between
Cwatson