|
@@ -12,10 +12,16 @@ var center_offset: Vector2
|
|
|
func _ready():
|
|
|
center_offset = _compute_center_offset()
|
|
|
set_visible(false)
|
|
|
+ remove_focus()
|
|
|
+
|
|
|
+
|
|
|
+func remove_focus() -> void:
|
|
|
+ set_process_unhandled_input(false)
|
|
|
|
|
|
|
|
|
func focus() -> void:
|
|
|
set_visible(true)
|
|
|
+ set_process_unhandled_input(true)
|
|
|
|
|
|
|
|
|
func get_center():
|
|
@@ -25,6 +31,7 @@ func get_center():
|
|
|
func _unhandled_key_input(event: InputEvent):
|
|
|
if event.is_action("ui_accept") and event.is_pressed():
|
|
|
finished.emit()
|
|
|
+ get_viewport().set_input_as_handled()
|
|
|
|
|
|
|
|
|
func _compute_center_offset() -> Vector2:
|