ld58-collector/cursor_manager.gd
2025-10-05 23:54:24 -07:00

20 lines
812 B
GDScript

extends Control
var hover = load("res://assets/cursor/cursor_open.png")
var click = load("res://assets/cursor/cursor_closed.png")
func _ready() -> void:
#Input.set_custom_mouse_cursor(hover)
Input.set_custom_mouse_cursor(hover, Input.CURSOR_ARROW, Vector2(30, 15))
#Input.set_custom_mouse_cursor(click, Input.CURSOR_DRAG)
Input.set_custom_mouse_cursor(click, Input.CURSOR_DRAG, Vector2(42, 24))
#func _input(event: InputEvent) -> void:
#if event is InputEventMouseButton and event.is_pressed():
##Input.set_custom_mouse_cursor(click)
##Input.set_default_cursor_shape(Input.CURSOR_IBEAM)
#mouse_default_cursor_shape = Control.CURSOR_DRAG
#elif event is InputEventMouseButton and not event.is_pressed():
##Input.set_custom_mouse_cursor(hover)
#mouse_default_cursor_shape = Control.CURSOR_ARROW