feat: Introduce a comprehensive game lobby system including UI, room management, and player interactions.

This commit is contained in:
Yogi Wiguna
2026-03-17 10:32:14 +08:00
parent eb018903aa
commit 49c8d794c2
5 changed files with 156 additions and 163 deletions
+12 -64
View File
@@ -43,10 +43,10 @@ anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -220.0
offset_top = -240.0
offset_right = 220.0
offset_bottom = 240.0
offset_left = -221.0
offset_top = -320.0
offset_right = 219.0
offset_bottom = 286.0
grow_horizontal = 2
grow_vertical = 2
@@ -76,22 +76,6 @@ horizontal_alignment = 1
[node name="Separator" type="HSeparator" parent="MainMenuPanel/VBoxContainer" unique_id=126990892]
layout_mode = 2
[node name="InputSection" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer" unique_id=1865748579]
layout_mode = 2
theme_override_constants/separation = 10
[node name="PlayerNameLabel" type="Label" parent="MainMenuPanel/VBoxContainer/InputSection" unique_id=1017736748]
layout_mode = 2
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
theme_override_font_sizes/font_size = 13
text = "YOUR NAME"
[node name="PlayerNameInput" type="LineEdit" parent="MainMenuPanel/VBoxContainer/InputSection" unique_id=1668571796]
custom_minimum_size = Vector2(0, 44)
layout_mode = 2
text = "Player"
placeholder_text = "Enter your name..."
[node name="ServerSelectionSection" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer" unique_id=748392101]
layout_mode = 2
theme_override_constants/separation = 10
@@ -121,43 +105,6 @@ layout_mode = 2
text = "127.0.0.1"
placeholder_text = "Enter Nakama Server IP..."
[node name="LANSection" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer/ServerSelectionSection" unique_id=748392110]
visible = false
layout_mode = 2
theme_override_constants/separation = 8
[node name="LANInfo" type="Label" parent="MainMenuPanel/VBoxContainer/ServerSelectionSection/LANSection" unique_id=748392111]
layout_mode = 2
theme_override_colors/font_color = Color(0.7, 0.7, 0.7, 1)
theme_override_font_sizes/font_size = 12
text = "Play over LAN without any server.\nFirewall may need to allow port 7777."
autowrap_mode = 3
[node name="LANHostBtn" type="Button" parent="MainMenuPanel/VBoxContainer/ServerSelectionSection/LANSection" unique_id=748392112]
custom_minimum_size = Vector2(0, 44)
layout_mode = 2
theme_override_font_sizes/font_size = 14
text = "HOST LAN GAME"
[node name="LANOrLabel" type="Label" parent="MainMenuPanel/VBoxContainer/ServerSelectionSection/LANSection" unique_id=748392113]
layout_mode = 2
theme_override_colors/font_color = Color(0.5, 0.5, 0.5, 1)
theme_override_font_sizes/font_size = 11
text = "── or join a friend ──"
horizontal_alignment = 1
[node name="LANIPInput" type="LineEdit" parent="MainMenuPanel/VBoxContainer/ServerSelectionSection/LANSection" unique_id=748392114]
custom_minimum_size = Vector2(0, 44)
layout_mode = 2
text = "127.0.0.1"
placeholder_text = "Host IP (e.g. 192.168.1.10)"
[node name="LANJoinBtn" type="Button" parent="MainMenuPanel/VBoxContainer/ServerSelectionSection/LANSection" unique_id=748392115]
custom_minimum_size = Vector2(0, 44)
layout_mode = 2
theme_override_font_sizes/font_size = 14
text = "JOIN LAN GAME"
[node name="ServerSeparator" type="HSeparator" parent="MainMenuPanel/VBoxContainer" unique_id=748392105]
layout_mode = 2
@@ -177,7 +124,7 @@ layout_mode = 2
theme_override_font_sizes/font_size = 16
text = "BROWSE ROOMS"
[node name="LeaderboardBtn" type="Button" parent="MainMenuPanel/VBoxContainer/ButtonSection"]
[node name="LeaderboardBtn" type="Button" parent="MainMenuPanel/VBoxContainer/ButtonSection" unique_id=216339260]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
theme_override_font_sizes/font_size = 16
@@ -190,14 +137,14 @@ theme_override_font_sizes/font_size = 16
text = "SETTINGS"
[node name="ProfileBtn" type="Button" parent="MainMenuPanel/VBoxContainer/ButtonSection" unique_id=1640960506]
layout_mode = 2
custom_minimum_size = Vector2(0, 36)
layout_mode = 2
theme_override_font_sizes/font_size = 14
text = "PROFILE"
[node name="QuitBtn" type="Button" parent="MainMenuPanel/VBoxContainer/ButtonSection" unique_id=123456780]
layout_mode = 2
custom_minimum_size = Vector2(0, 36)
layout_mode = 2
theme_override_font_sizes/font_size = 14
text = "QUIT GAME"
@@ -278,6 +225,7 @@ layout_mode = 2
text = "PROFILE"
[node name="LobbyPanel" type="Control" parent="." unique_id=1745714811]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@@ -1188,10 +1136,10 @@ anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 464.0
offset_top = -93.0
offset_right = -461.0
offset_bottom = -44.0
offset_left = 466.0
offset_top = -65.0
offset_right = -459.0
offset_bottom = -16.0
grow_horizontal = 2
grow_vertical = 0