server: added broadcast for players entering the lobby. client: added text output for connection actions

This commit is contained in:
2025-06-30 22:07:43 +02:00
parent 07a37a5602
commit d128f39e6a
4 changed files with 31 additions and 3 deletions
+3 -1
View File
@@ -12,7 +12,7 @@ font_weight = 500
[node name="WebClientTCP" type="Node" parent="."]
script = ExtResource("1_feb5d")
[node name="ClientInterface" type="Control" parent="." node_paths=PackedStringArray("client", "connect_button", "create_lobby_button", "join_lobby_button", "leave_lobby_button", "name_input", "lobby_code_input")]
[node name="ClientInterface" type="Control" parent="." node_paths=PackedStringArray("client", "connect_button", "create_lobby_button", "join_lobby_button", "leave_lobby_button", "name_input", "lobby_code_input", "output")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
@@ -27,6 +27,7 @@ join_lobby_button = NodePath("HBoxContainer/VBoxContainer/JoinLobbyButton")
leave_lobby_button = NodePath("HBoxContainer/VBoxContainer/LeaveLobbyButton")
name_input = NodePath("HBoxContainer/VBoxContainer/NameInput")
lobby_code_input = NodePath("HBoxContainer/VBoxContainer/LobbyCodeInput")
output = NodePath("HBoxContainer/Output")
[node name="ColorRect" type="ColorRect" parent="ClientInterface"]
layout_mode = 1
@@ -83,6 +84,7 @@ size_flags_vertical = 1
theme_override_fonts/font = SubResource("SystemFont_80nbo")
autowrap_mode = 2
[connection signal="client_joined_lobby" from="WebClientTCP" to="ClientInterface" method="_on_web_client_tcp_client_joined_lobby"]
[connection signal="connected_to_lobby" from="WebClientTCP" to="ClientInterface" method="_on_web_client_tcp_connected_to_lobby"]
[connection signal="connected_to_server" from="WebClientTCP" to="ClientInterface" method="_on_web_client_tcp_connected_to_server"]
[connection signal="connection_error_occurred" from="WebClientTCP" to="ClientInterface" method="_on_web_client_tcp_connection_error_occurred"]