Godot Version
v4.7.2.stable.mono.official [ed1daf0bf]
Question
I’m aware about two methods, and both are not fully effective.
You can hide mouse cursor:
Input.MouseMode = Input.MouseModeEnum.Hidden;
This way cursor is not visible, but it still can interact with user interface (like buttons).
There is “stronger” method:
Input.MouseMode = Input.MouseModeEnum.Confined;
This way cursor is not visible and locked at the center of the screen. But it has the same issue - it can still interact with user interface when for example button is at the center of the screen.
Is it possible to fully disable mouse cursor? If not, the only way out that I can see is to use Confined option and design your user interface so there are no interactive elements at the center, which is sometimes easier said than done.