I have a perhaps slightly odd question:
How might I detect whether the mouse is over a DirectFrame (or other DirectGUI object–I’m open to changing which one I use), without using “bind” to detect events?
MouseWatcherRegions seem as though they might provide one potential solution, but my gui objects are kept in a DirectScrolledRegion, meaning that their position might change, and some might be off-screen; I could update the regions manually, but at that point I might as well just check the mouse-coordinates at the same time and drop the MouseWatcherRegions, it would seem.
To explain, I have a project in which I want to detect and respond to various events related to a set of DirectGUI elements: I want to know when the mouse enters or leaves them, and want to respond to “action” -down and -up events. These “action” events would by default be mouse events–meaning that I could potentially just use “bind” to detect them–but I’m allowing my users to redefine their key-mappings, including the “action” key; I could make this particular system (an inventory) an exception, having it only respond to the mouse, but would prefer not to: I may think that using “k” for “action” is a somewhat silly idea, but if a player wants to have it so, I’d prefer to keep my in-game interface consistent.
(In all fairness the menus would still respond to the mouse, rather than the “action” key, which might give some weight to the idea of making an exception to interface consistency here, but I’d like to at least try to get this working as intended.)