client now displays currently connected players by name

This commit is contained in:
2025-07-07 22:11:02 +02:00
parent f51444874a
commit 4ac3fbd962
3 changed files with 21 additions and 6 deletions
+10 -1
View File
@@ -20,7 +20,7 @@ anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="ClientInterface" type="ColorRect" parent="HBoxContainer" node_paths=PackedStringArray("client", "connect_button", "create_lobby_button", "join_lobby_button", "leave_lobby_button", "chat_message_input", "send_chat_message_button", "name_input", "lobby_code_input", "output")]
[node name="ClientInterface" type="ColorRect" parent="HBoxContainer" node_paths=PackedStringArray("client", "connect_button", "create_lobby_button", "join_lobby_button", "leave_lobby_button", "chat_message_input", "send_chat_message_button", "connected_players_label", "name_input", "lobby_code_input", "output")]
custom_minimum_size = Vector2(316, 0)
layout_mode = 2
color = Color(0.26, 0.2236, 0.230273, 1)
@@ -32,6 +32,7 @@ join_lobby_button = NodePath("MarginContainer/VBoxContainer/ServerInputs/JoinLob
leave_lobby_button = NodePath("MarginContainer/VBoxContainer/ServerInputs/LeaveLobbyButton")
chat_message_input = NodePath("MarginContainer/VBoxContainer/ChatContainer/MessageInput")
send_chat_message_button = NodePath("MarginContainer/VBoxContainer/ChatContainer/SendMessageButton")
connected_players_label = NodePath("MarginContainer/VBoxContainer/ConnectedPlayersLabel")
name_input = NodePath("MarginContainer/VBoxContainer/ServerInputs/NameInput")
lobby_code_input = NodePath("MarginContainer/VBoxContainer/ServerInputs/LobbyCodeInput")
output = NodePath("MarginContainer/VBoxContainer/ScrollContainer/Output")
@@ -97,6 +98,14 @@ layout_mode = 2
disabled = true
text = "Disconnect"
[node name="ConnectedPlayersLabel" type="Label" parent="HBoxContainer/ClientInterface/MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="Divider" type="ColorRect" parent="HBoxContainer/ClientInterface/MarginContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 2)
layout_mode = 2
color = Color(0.55, 0.3905, 0.3905, 1)
[node name="ScrollContainer" type="ScrollContainer" parent="HBoxContainer/ClientInterface/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3