thegates/app/scripts/ui/world/release_focus.gd
2024-05-04 00:14:24 +04:00

8 lines
188 B
GDScript

extends Control
func _input(event: InputEvent) -> void:
if (has_focus()
and event is InputEventMouseButton
and not get_global_rect().has_point(event.position)):
release_focus()