20 lines
812 B
GDScript
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
|