I want to monitor certain regions of the screen using MouseWatcherRegion. After fiddling with things a bit, I’ve managed to get mouseWatcherNode.getOverRegion to recognize the region that I declare.
But how I do Messenger to automatically create entry/exit messages for the custom MouseWatcherRegion like it does for the DirectGui* stuff? Right now, messenger doesn’t provide any messages when I wave the mice across my custom region.
wouldn’t you have to make a task to check to see which region the mouse is it? I dont remember any exact code but I think I did something like that for someone else before. Sorry if Im not terribly helpful
Yes, I could poll mouseWatcherNode.getOverRegion() every frame using a task, but I would prefer to have a unified system. (The DirectGui objects all use the messenger system.)
Hmm, looks like we haven’t exposed the MouseWatcherGroup constructor to Python. But normally there’s no reason to create a new group; it doesn’t give you any new functionality that you don’t have already in the existing MouseWatcher object. The reason that MouseWatcherGroup exists is to support certain low-level C++ features such as the PGui system (which is the C++ implementation of DirectGui). If you’re just writing Python-level code, I’m not sure that there’s anything useful that MouseWatcherGroup gives you.