Teams in lobby

This commit is contained in:
Rendo 2025-11-27 00:36:24 +05:00
commit 787de0ab09
6 changed files with 210 additions and 43 deletions

View file

@ -1,22 +1,20 @@
[gd_scene load_steps=4 format=3 uid="uid://cbtp4rvg66ba1"]
[gd_scene load_steps=3 format=3 uid="uid://cbtp4rvg66ba1"]
[ext_resource type="Script" uid="uid://bsyuos803g7qf" path="res://scripts/gui/main_menu_gui.gd" id="1_l6cm7"]
[ext_resource type="Script" uid="uid://cl3hhmw5666sj" path="res://scripts/gui/lobby/players_display.gd" id="2_ekxnf"]
[ext_resource type="Script" uid="uid://2uyxkfmbbims" path="res://scripts/gui/lobby/lobby_buttons.gd" id="3_bqqt6"]
[node name="MainMenu" type="Control"]
layout_mode = 3
[node name="MainMenu" type="CenterContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_l6cm7")
metadata/_edit_lock_ = true
[node name="MainMenu" type="PanelContainer" parent="."]
layout_mode = 0
offset_right = 293.0
offset_bottom = 101.0
custom_minimum_size = Vector2(256, 0)
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="MainMenu"]
layout_mode = 2
@ -35,30 +33,82 @@ placeholder_text = "ip"
[node name="Lobby" type="PanelContainer" parent="."]
visible = false
layout_mode = 0
offset_right = 305.0
offset_bottom = 242.0
custom_minimum_size = Vector2(256, 256)
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="Lobby"]
layout_mode = 2
[node name="Players" type="HBoxContainer" parent="Lobby/VBoxContainer"]
layout_mode = 2
script = ExtResource("2_ekxnf")
size_flags_vertical = 3
alignment = 1
[node name="AttackTeam" type="VBoxContainer" parent="Lobby/VBoxContainer/Players"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
[node name="TeamName" type="Label" parent="Lobby/VBoxContainer/Players/AttackTeam"]
layout_mode = 2
text = "Attack"
horizontal_alignment = 1
[node name="DefenceTeam" type="VBoxContainer" parent="Lobby/VBoxContainer/Players"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
[node name="TeamName" type="Label" parent="Lobby/VBoxContainer/Players/DefenceTeam"]
layout_mode = 2
text = "Defence"
horizontal_alignment = 1
[node name="SpectatorsTeam" type="VBoxContainer" parent="Lobby/VBoxContainer/Players"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
[node name="TeamName" type="Label" parent="Lobby/VBoxContainer/Players/SpectatorsTeam"]
layout_mode = 2
text = "Spectators"
horizontal_alignment = 1
[node name="Buttons" type="HBoxContainer" parent="Lobby/VBoxContainer"]
layout_mode = 2
alignment = 1
script = ExtResource("3_bqqt6")
[node name="LeaveButton" type="Button" parent="Lobby/VBoxContainer/Buttons"]
unique_name_in_owner = true
layout_mode = 2
text = "Leave"
[node name="StartButton" type="Button" parent="Lobby/VBoxContainer/Buttons"]
unique_name_in_owner = true
layout_mode = 2
text = "Start"
[node name="JoinAttackButton" type="Button" parent="Lobby/VBoxContainer/Buttons"]
unique_name_in_owner = true
layout_mode = 2
text = "Join Attack"
[node name="JoinDefenceButton" type="Button" parent="Lobby/VBoxContainer/Buttons"]
unique_name_in_owner = true
layout_mode = 2
text = "Join Defence"
[node name="JoinSpectatorsButton" type="Button" parent="Lobby/VBoxContainer/Buttons"]
unique_name_in_owner = true
visible = false
layout_mode = 2
text = "Join Spectators"
[connection signal="pressed" from="MainMenu/VBoxContainer/HostButton" to="." method="_on_host_button_pressed"]
[connection signal="pressed" from="MainMenu/VBoxContainer/ConnectButton" to="." method="_on_connect_button_pressed"]
[connection signal="pressed" from="Lobby/VBoxContainer/Buttons/LeaveButton" to="Lobby/VBoxContainer/Buttons" method="_on_leave_button_pressed"]
[connection signal="pressed" from="Lobby/VBoxContainer/Buttons/StartButton" to="Lobby/VBoxContainer/Buttons" method="_on_start_button_pressed"]
[connection signal="pressed" from="Lobby/VBoxContainer/Buttons/LeaveButton" to="." method="_on_leave_button_pressed"]
[connection signal="pressed" from="Lobby/VBoxContainer/Buttons/StartButton" to="." method="_on_start_button_pressed"]
[connection signal="pressed" from="Lobby/VBoxContainer/Buttons/JoinAttackButton" to="." method="_on_join_attack_button_pressed"]
[connection signal="pressed" from="Lobby/VBoxContainer/Buttons/JoinDefenceButton" to="." method="_on_join_defence_button_pressed"]
[connection signal="pressed" from="Lobby/VBoxContainer/Buttons/JoinSpectatorsButton" to="." method="_on_join_spectators_button_pressed"]