How to check for UI mouse events properly,
Members - Reputation: 206
Posted 15 August 2012 - 07:10 AM
When developing my game, I ran into a problem: How can I properly check the mouse event for my UI? For example if I want to click on the map, then I dont want the game to handle that click, just only the UIHandler. Or closing a window, and in the game the left click is shooting, or casting a spell. Then if I want to close the window, my character shoots a fireball and closes the window. How can I solve this problem?
Members - Reputation: 804
Posted 15 August 2012 - 10:24 AM
This makes it easy to pop up a 'pause screen' and halt updates to the 'game screen'. Or in your case, create a 'UI screen' and if input was handled, don't pass it down to the 'game screen' - just like Faelenor suggested.