Jump to content

Get true/false is mouse if over a sprite


iambaz
 Share

Recommended Posts

I am building the interface for a game and one part has a grid of square buttons. When the user hovers over the button, a information box (as a sprite) and some options appear as an overlay underneath the button and the user should be able to click the button to make a selection. 

The problem I have is that as soon as the mouse moves beyond the boundary of the button, my onMouseOut event kicks in and closes the overlay before the user has a chance to click anything in it. 

So what I need to implement is some logic that says "On mouse out of button, check to see if the mouser is above the overlay sprite. If it is then don't hide it. If it's not then do hide it. 

So is there any way of simply getting a boolean answer to "is the mouse pointer over this sprite" 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...