From a562929421b42b867ff04e83218fa316c0649700 Mon Sep 17 00:00:00 2001 From: unfa Date: Fri, 16 Jul 2021 03:42:22 +0200 Subject: [PATCH] Fixed chat message editor not sending --- Game/Assets/HUD/Chat.gd | 2 +- Game/Assets/HUD/HUD.tscn | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Game/Assets/HUD/Chat.gd b/Game/Assets/HUD/Chat.gd index 6d1be22..66560c4 100644 --- a/Game/Assets/HUD/Chat.gd +++ b/Game/Assets/HUD/Chat.gd @@ -58,7 +58,7 @@ func _unhandled_input(_event) -> void: chat_history.append_bbcode('\n' + '[b][color=' + sender_info.color.to_html() +']' + str(sender_info.name) + '[/color][/b] : [i]' + message + '[/i]') -func _on_LineEdit_text_entered(new_text): +func _on_Editor_text_submitted(new_text): # RPC is currently not implemented in the engine var sender_id = get_tree().get_network_unique_id() var new_message = [sender_id, 0, new_text] diff --git a/Game/Assets/HUD/HUD.tscn b/Game/Assets/HUD/HUD.tscn index 769e2e6..1752ffd 100644 --- a/Game/Assets/HUD/HUD.tscn +++ b/Game/Assets/HUD/HUD.tscn @@ -219,3 +219,5 @@ script = null __meta__ = { "_edit_use_anchors_": false } + +[connection signal="text_submitted" from="Chat/VBoxContainer/Typing/Editor" to="Chat" method="_on_Editor_text_submitted"]