From 0a8ce4b5a117e8a2613a0a09f796992a1878ac2d Mon Sep 17 00:00:00 2001 From: unfa Date: Fri, 1 Oct 2021 20:11:32 +0200 Subject: [PATCH] Fixed the chat bug and the bug that previous fix created --- Game/Assets/HUD/Chat.gd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Game/Assets/HUD/Chat.gd b/Game/Assets/HUD/Chat.gd index a7e1c39..e2aba9d 100644 --- a/Game/Assets/HUD/Chat.gd +++ b/Game/Assets/HUD/Chat.gd @@ -31,7 +31,9 @@ func _ready(): pass func _input(_event) -> void: - if state == ChatState.INACTIVE and main.focus == main.GameFocus.GAME: + pass +func _unhandled_input(_event) -> void: + if state == ChatState.INACTIVE: if Input.is_action_just_pressed("say_all"): main.focus = main.GameFocus.CHAT state = ChatState.TYPING_ALL @@ -46,7 +48,6 @@ func _input(_event) -> void: main.focus = main.GameFocus.GAME state = ChatState.INACTIVE -func _unhandled_input(_event) -> void: if state != ChatState.INACTIVE: get_tree().get_root().set_input_as_handled()