Is there a means to–temporarily!–disable mouse-events entirely, but with the caveat of not disrupting detection of the mouse-position?
To explain, I’m working on the navigation of my current project’s UI via means other than the mouse. That is, navigation via things like gamepads, keyboard, etc.
Now, for the most part I have a functional system for this, I believe. However, there is a problem: if the mouse is left hovering over a UI element, mouse-events (such as a bound “DGG.ENTER”) seem to still be fired as a result. This then results in some bugs.
I can likely handle at least some of this myself–I can get a callback when entering “non-mouse mode” and unbind events like “DGG.ENTER”.
However, that means doing so for all relevant UI elements. And further, I suspect that it won’t work for the built-in mouse-driven state-changes (things like the standard hover-behaviour of a DirectButton). And further, I don’t want to just disable my UI elements because I still want them to react to the non-mouse navigation as though to a mouse-cursor.
Thus I’m hoping that there’s a “global” way of disabling the effect of the mouse.
However, I do nevertheless want to retain the ability to query the position of the mouse, so that I can detect the player attempting to return to “mouse mode”.
I’ve looked at the MouseWatcher class, but I don’t see any methods that seem likely to disable its events.
I suppose that I could detach the standard mouse-watcher node, but I don’t know how that’s properly done–or what the consequences of detaching and reattaching it might be. Especially given that I have at least one custom mouse-watching present…
So, thoughts?