Godot Version
Godot 4.2.2
Question
I am trying to build a 3D WoW-like interface. The mouse is left like a normal pointer so that the user can click on information in hot bars and dialog controls. However, when the mouse buttons are pressed, the mouse is captured and the character or camara can be rotated. There are also action keys that are used to walk around and interact, etc.
One of the problems I have is the input processed during the _physics_process() still work when I am trying to interact with the 2D controls of the HUD and windows that I pop up. I have tried counting when mouse entering/exiting panels and focus entered/existing and ignoring actions and the mouse in my _physics_process() when those counts are non-zero. This mostly works, but I still hit a problem when trying to use a scroll bar with the mouse. When using the scroll bar, the mouse is captured by the UI but if I wander off the scroll bar, my code will captures the mouse and move the camera or player. This is because the mouse entering/exiting count goes to 0 because I have drifted out of the window.
This all seems like much more work than it should be and it is still not even a complete solution. Is there a better way? Is there a way to plug the hole of the UI capturing the mouse?