Fixed the chat bug and the bug that previous fix created

main
unfa 2021-10-01 20:11:32 +02:00
parent 3e70b0c91f
commit 0a8ce4b5a1
1 changed files with 3 additions and 2 deletions

View File

@ -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()