It is necessary that the cursor, when hovering over the Control
(in my case, FileDialog
), changes from the one specified in the project settings to the system arrow, and vice versa when leaving this element. Changing the script with Input.set_default_cursor_shape()
doesn't help. How to fix it?
How to use the system cursor on Control?
Do you have your code ?
Did you try printing and seeing if your signals mouse_entered and mouse_exited works ?
- Edited
You connected the mouse_entered signal to a function? Did you verify that the function is getting called at the expected time by placing a print statement in it?
Also:
Note: If you want to change the default cursor shape for Control's nodes, use Control.mouse_default_cursor_shape instead.
In this case, you would set the FileDialog's mouse_default_cursor_shape property to one of the values here, such as Control.CURSOR_ARROW:
https://docs.godotengine.org/en/3.5/classes/class_control.html#enum-control-cursorshape
You can also change the property for the Control in the Inspector:
Mouse >> Default Cursor Shape
DaveTheCoder You connected the mouse_entered signal to a function? Did you verify that the function is getting called at the expected time by placing a print statement in it?
Yes, these methods are executed.
DaveTheCoder Also:
Note: If you want to change the default cursor shape for Control's nodes, use Control.mouse_default_cursor_shape instead.
I don't need this. I have a custom cursor in the game, and I want to make it so that when the mouse enters the element, the cursor becomes the same as in the operating system.