This commit is contained in:
2026-05-14 19:11:10 +02:00
parent 2d4002bd3f
commit 52ad83a96d
15 changed files with 169 additions and 31 deletions

View File

@@ -84,7 +84,19 @@ func _process(_delta: float) -> void:
_update_build_preview()
_update_minimap()
func _is_typing() -> bool:
var f := get_viewport().gui_get_focus_owner()
return f is LineEdit or f is TextEdit
func _unhandled_input(event: InputEvent) -> void:
if _is_typing():
if event.is_action_pressed("pause"):
var f := get_viewport().gui_get_focus_owner()
if f is LineEdit:
(f as LineEdit).release_focus()
_capture_ui(_any_panel_visible())
get_viewport().set_input_as_handled()
return
if event.is_action_pressed("inventory"):
_toggle_panel(inventory_panel)
_refresh_inventory()