I just use a sprite with two frames for my buttons. Frame 1 is its' rest state, and frame 2 is for when the button is highlighted. If I wanted to, I guess I could add a third frame for when a button is actually pressed. Come to think of it, I need to come up with a more efficient routine for handling buttons. The one I use now is a bit convoluted. Now I check X and Y positions, and if the mouse pointer is within Y->Y+n && X->X+n area of a given button it highlights.
A snippet to show how it works with two buttons next to eachother on the same row:
if mouseY > conStartY + (conSpace * 2) and mouseY < conStartY + (conSpace * 3)
// Back
if mouseX > adjustStart + (adjustSpace * 10) and mouseX < adjustStart + (adjustSpace * 11)
setSpriteFrame(119,2)
if mouseHit = 1
menuChoice = 14
endif
else
setSpriteFrame(119, 1)
endif
// Forward
if mouseX > adjustStart + (adjustSpace * 11) and mouseX < adjustStart + (adjustSpace * 12)
setSpriteFrame(120,2)
if mouseHit = 1
menuChoice = 15
endif
else
setSpriteFrame(120, 1)
endif
else
setSpriteFrame(119, 1)
setSpriteFrame(120, 1)
endif
This is hardly elegant however, and I am not to sure if it is all that efficient either. If anyone got a better solution, I'd love to see it