Fixed the chat bug and the bug that previous fix created
parent
3e70b0c91f
commit
0a8ce4b5a1
|
@ -31,7 +31,9 @@ func _ready():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func _input(_event) -> void:
|
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"):
|
if Input.is_action_just_pressed("say_all"):
|
||||||
main.focus = main.GameFocus.CHAT
|
main.focus = main.GameFocus.CHAT
|
||||||
state = ChatState.TYPING_ALL
|
state = ChatState.TYPING_ALL
|
||||||
|
@ -46,7 +48,6 @@ func _input(_event) -> void:
|
||||||
main.focus = main.GameFocus.GAME
|
main.focus = main.GameFocus.GAME
|
||||||
state = ChatState.INACTIVE
|
state = ChatState.INACTIVE
|
||||||
|
|
||||||
func _unhandled_input(_event) -> void:
|
|
||||||
if state != ChatState.INACTIVE:
|
if state != ChatState.INACTIVE:
|
||||||
get_tree().get_root().set_input_as_handled()
|
get_tree().get_root().set_input_as_handled()
|
||||||
|
|
||||||
|
|
Reference in New Issue