iambaz Posted September 9, 2016 Share Posted September 9, 2016 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 More sharing options...
iambaz Posted September 12, 2016 Author Share Posted September 12, 2016 Still struggling with this if anyone can help... Link to comment Share on other sites More sharing options...
samme Posted September 13, 2016 Share Posted September 13, 2016 There is http://phaser.io/docs/2.6.1/Phaser.InputHandler.html#checkPointerOver . But could you just move the onMouseOut handler from the button to the overlay? Link to comment Share on other sites More sharing options...
Recommended Posts