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?
Do you have your code ?
Did you try printing and seeing if your signals mouse_entered and mouse_exited works ?
Tucci Mmm... I tried to call Input.set_default_cursor_shape()
on mouse_entered
signal. Do you understand correctly what I want to do?
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
Sixfooter 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.
Sixfooter 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.
© 2022 - 2024 — McMap. All rights reserved.