Files
GGJ26/utils/clickable.gd
Minimata a37aeb620d
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 9s
Create tag and build when new code gets to main / Export (push) Successful in 1m44s
few UX improvements
2026-02-02 16:58:09 +01:00

20 lines
490 B
GDScript

extends Area2D
class_name Clickable
signal on_clicked
func _on_mouse_entered() -> void:
Input.set_default_cursor_shape(Input.CursorShape.CURSOR_POINTING_HAND)
func _on_mouse_exited() -> void:
Input.set_default_cursor_shape(Input.CursorShape.CURSOR_ARROW)
func _on_input_event(viewport: Node, event: InputEvent, shape_idx: int) -> void:
if event is InputEventMouseButton and event.is_pressed():
Input.set_default_cursor_shape(Input.CursorShape.CURSOR_ARROW)
on_clicked.emit()