update!
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user