Godot Version
4.2.1.stable
Question
Hi! I would like to know why the last line is not working; I tried to get help on reddit but to no avail.
The debugging tool doesn’t accuse of anything. I’m trying to change the shape of the cursor. Everything but the last line works, for example, changing the last line to get_tree().quit() works.
func _ready():
var cursor1 = load("res://cursor1.png")
var cursor2 = load("res://cursor2.png")
Input.set_custom_mouse_cursor(cursor1, Input.CURSOR_ARROW, Vector2(0, 0))
Input.set_custom_mouse_cursor(cursor2, Input.CURSOR_WAIT, Vector2(0, 0))
func _input(event):
if event.is_action_pressed("ChangeCursor"):
if Input.get_current_cursor_shape() == Input.CURSOR_ARROW:
Input.set_default_cursor_shape(Input.CURSOR_WAIT)
Additional information: I’m on 2D compatibility; the ChangeCursor is right mouse button and nothing else is using this button; set_custom works but set_default doesn’t; I don’t know what Control is and I’m not using it.
Thanks in advance for the help!!