in the comment place, put something like this:
if ( dbSpriteCollision ( 1, 2, ) )
{
//the mouse is over the button
}
note that dbSpriteCollision takes two arguments, which are the IDs of the two wanted sprites, it checks collision between them, if they are colliding it returns true, otherwise false
in case you dont want a sprite over the mouse, and you want to use the actual mouse position for calculations, simply replace dbSpriteCollision with a mouse position check, for example you can write your own mouse collision function like this:
bool MouseOverSprite ( int spriteID )
{
if ( dbMouseX ( ) > dbSpriteX ( spriteID ) &&
dbMouseX ( ) < dbSpriteX ( spriteID ) + dbSpriteWidth ( spriteID ) &&
dbMouseY ( ) > dbSpriteY ( spriteID ) &&
dbMouseY ( ) < dbSpriteY ( spriteID ) + dbSpriteHeight ( spriteID ) )
return true;
else
return false;
}