I've built my own function for them that supports multitouch or GetPointer[foo]()
Here you go, if you decide to use it:
`initstuff
type buttonz
id
i1
i2
endtype
global touch=0 `set to 1 to make it multi-touch (won't work on windows though)
global quit as buttonz
quit=makebutton(0,30,40,15,LoadImage("quitimg1.png"),LoadImage("quitimg2.png"))
do
s=button(quit) `button will do the graphics for the button and return 1 if it's down, and 2 if it's released
if s=2
end
elseif s=1
Print("Button Down")
endif
sync()
loop
function button(b as buttonz)
state=0
if touch=1
count=GetRawTouchCount(1)
if count>0
for k = 1 to count
x = GetRawTouchCurrentX(k)
y = GetRawTouchCurrentY(k)
if GetSpriteHitTest(b.id,x,y)
SetSpriteImage(b.id,b.i2)
state=1
else
SetSpriteImage(b.id,b.i1)
state=0
endif
if GetRawTouchReleased(k)
if GetSpriteHitTest(b.id,x,y)
state=2
endif
endif
next
else
SetSpriteImage(b.id,b.i1)
endif
else`**************************************************
x = GetPointerX()
y = GetPointerY()
if GetPointerReleased()
if GetSpriteHitTest(b.id,x,y)
state=2
endif
endif
if GetPointerState()
if GetSpriteHitTest(b.id,x,y)
SetSpriteImage(b.id,b.i2)
state=1
else
SetSpriteImage(b.id,b.i1)
endif
else`**********
SetSpriteImage(b.id,b.i1)
endif
endif
endfunction state
function makebutton(x,y,xs,ys,i1,i2)
b as buttonz
b.id = CreateSprite(i1)
SetSpriteSize(b.id,xs,ys)
SetSpritePosition(b.id,x,y)
b.i1=i1
b.i2=i2
endfunction b