update
This commit is contained in:
+57
-219
@@ -1,86 +1,7 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://b7nxt2hc4kqp8"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dhc76l8jafa85"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b5q6yekyk0tld" path="res://scenes/lobby.gd" id="1_lp6xi"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_panel"]
|
||||
content_margin_left = 24.0
|
||||
content_margin_top = 20.0
|
||||
content_margin_right = 24.0
|
||||
content_margin_bottom = 20.0
|
||||
bg_color = Color(0.12, 0.12, 0.14, 0.95)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.9, 0.45, 0.1, 0.8)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_input"]
|
||||
content_margin_left = 12.0
|
||||
content_margin_top = 8.0
|
||||
content_margin_right = 12.0
|
||||
content_margin_bottom = 8.0
|
||||
bg_color = Color(0.08, 0.08, 0.1, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.3, 0.3, 0.35, 1)
|
||||
corner_radius_top_left = 3
|
||||
corner_radius_top_right = 3
|
||||
corner_radius_bottom_right = 3
|
||||
corner_radius_bottom_left = 3
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_button_hover"]
|
||||
content_margin_left = 16.0
|
||||
content_margin_top = 8.0
|
||||
content_margin_right = 16.0
|
||||
content_margin_bottom = 8.0
|
||||
bg_color = Color(0.9, 0.45, 0.1, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(1, 0.6, 0.2, 1)
|
||||
corner_radius_top_left = 3
|
||||
corner_radius_top_right = 3
|
||||
corner_radius_bottom_right = 3
|
||||
corner_radius_bottom_left = 3
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_button_pressed"]
|
||||
content_margin_left = 16.0
|
||||
content_margin_top = 8.0
|
||||
content_margin_right = 16.0
|
||||
content_margin_bottom = 8.0
|
||||
bg_color = Color(0.7, 0.35, 0.05, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.9, 0.5, 0.15, 1)
|
||||
corner_radius_top_left = 3
|
||||
corner_radius_top_right = 3
|
||||
corner_radius_bottom_right = 3
|
||||
corner_radius_bottom_left = 3
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_button_normal"]
|
||||
content_margin_left = 16.0
|
||||
content_margin_top = 8.0
|
||||
content_margin_right = 16.0
|
||||
content_margin_bottom = 8.0
|
||||
bg_color = Color(0.18, 0.18, 0.2, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.4, 0.4, 0.45, 1)
|
||||
corner_radius_top_left = 3
|
||||
corner_radius_top_right = 3
|
||||
corner_radius_bottom_right = 3
|
||||
corner_radius_bottom_left = 3
|
||||
[ext_resource type="Theme" uid="uid://da337sh5qxi0s" path="res://assets/themes/ui_theme.tres" id="2_theme"]
|
||||
|
||||
[node name="Lobby" type="Control"]
|
||||
layout_mode = 3
|
||||
@@ -89,6 +10,7 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("2_theme")
|
||||
script = ExtResource("1_lp6xi")
|
||||
|
||||
[node name="Background" type="ColorRect" parent="."]
|
||||
@@ -98,17 +20,7 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.06, 0.06, 0.08, 1)
|
||||
|
||||
[node name="BackgroundPattern" type="ColorRect" parent="."]
|
||||
modulate = Color(1, 1, 1, 0.03)
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.9, 0.45, 0.1, 1)
|
||||
color = Color(0.12, 0.1, 0.08, 1)
|
||||
|
||||
[node name="MainMenuPanel" type="PanelContainer" parent="."]
|
||||
layout_mode = 1
|
||||
@@ -118,16 +30,15 @@ anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -220.0
|
||||
offset_top = -220.0
|
||||
offset_top = -240.0
|
||||
offset_right = 220.0
|
||||
offset_bottom = 220.0
|
||||
offset_bottom = 240.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_panel")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MainMenuPanel"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 16
|
||||
theme_override_constants/separation = 18
|
||||
|
||||
[node name="TitleContainer" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
@@ -135,69 +46,52 @@ theme_override_constants/separation = 4
|
||||
|
||||
[node name="Title" type="Label" parent="MainMenuPanel/VBoxContainer/TitleContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.95, 0.5, 0.15, 1)
|
||||
theme_override_font_sizes/font_size = 42
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 44
|
||||
text = "TEKTON DASH"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Subtitle" type="Label" parent="MainMenuPanel/VBoxContainer/TitleContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.5, 0.5, 0.55, 1)
|
||||
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "ARMAGEDDON VERSION"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Separator" type="HSeparator" parent="MainMenuPanel/VBoxContainer"]
|
||||
modulate = Color(0.9, 0.45, 0.1, 0.5)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="InputSection" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="PlayerNameLabel" type="Label" parent="MainMenuPanel/VBoxContainer/InputSection"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.7, 0.7, 0.75, 1)
|
||||
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"]
|
||||
custom_minimum_size = Vector2(0, 36)
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_placeholder_color = Color(0.4, 0.4, 0.45, 1)
|
||||
theme_override_colors/font_color = Color(0.9, 0.9, 0.95, 1)
|
||||
theme_override_font_sizes/font_size = 14
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_input")
|
||||
text = "Player"
|
||||
placeholder_text = "Enter your name..."
|
||||
|
||||
[node name="ButtonSection" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
theme_override_constants/separation = 12
|
||||
|
||||
[node name="CreateRoomBtn" type="Button" parent="MainMenuPanel/VBoxContainer/ButtonSection"]
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
custom_minimum_size = Vector2(0, 48)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_hover_color = Color(0.1, 0.1, 0.12, 1)
|
||||
theme_override_colors/font_color = Color(0.95, 0.95, 1, 1)
|
||||
theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
|
||||
theme_override_font_sizes/font_size = 15
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_button_hover")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_button_pressed")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_button_normal")
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "CREATE ROOM"
|
||||
|
||||
[node name="BrowseRoomsBtn" type="Button" parent="MainMenuPanel/VBoxContainer/ButtonSection"]
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
custom_minimum_size = Vector2(0, 48)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_hover_color = Color(0.1, 0.1, 0.12, 1)
|
||||
theme_override_colors/font_color = Color(0.95, 0.95, 1, 1)
|
||||
theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
|
||||
theme_override_font_sizes/font_size = 15
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_button_hover")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_button_pressed")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_button_normal")
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "BROWSE ROOMS"
|
||||
|
||||
[node name="RoomListPanel" type="PanelContainer" parent="."]
|
||||
@@ -208,94 +102,67 @@ anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -280.0
|
||||
offset_top = -240.0
|
||||
offset_right = 280.0
|
||||
offset_bottom = 240.0
|
||||
offset_left = -300.0
|
||||
offset_top = -260.0
|
||||
offset_right = 300.0
|
||||
offset_bottom = 260.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_panel")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="RoomListPanel"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 12
|
||||
theme_override_constants/separation = 14
|
||||
|
||||
[node name="Header" type="Label" parent="RoomListPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.95, 0.5, 0.15, 1)
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 28
|
||||
text = "SERVER BROWSER"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="RoomListPanel/VBoxContainer"]
|
||||
modulate = Color(0.9, 0.45, 0.1, 0.5)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MatchIdLabel" type="Label" parent="RoomListPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.6, 0.6, 0.65, 1)
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "DIRECT CONNECT (MATCH ID)"
|
||||
|
||||
[node name="MatchIdInput" type="LineEdit" parent="RoomListPanel/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 36)
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_placeholder_color = Color(0.4, 0.4, 0.45, 1)
|
||||
theme_override_colors/font_color = Color(0.9, 0.9, 0.95, 1)
|
||||
theme_override_font_sizes/font_size = 14
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_input")
|
||||
placeholder_text = "Paste match ID here..."
|
||||
|
||||
[node name="RoomListLabel" type="Label" parent="RoomListPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.6, 0.6, 0.65, 1)
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "AVAILABLE SERVERS"
|
||||
|
||||
[node name="RoomList" type="ItemList" parent="RoomListPanel/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 180)
|
||||
custom_minimum_size = Vector2(0, 200)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_selected_color = Color(0.1, 0.1, 0.12, 1)
|
||||
theme_override_colors/font_color = Color(0.85, 0.85, 0.9, 1)
|
||||
theme_override_font_sizes/font_size = 14
|
||||
allow_reselect = true
|
||||
|
||||
[node name="ButtonContainer" type="HBoxContainer" parent="RoomListPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 12
|
||||
theme_override_constants/separation = 14
|
||||
alignment = 1
|
||||
|
||||
[node name="RefreshBtn" type="Button" parent="RoomListPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(100, 40)
|
||||
custom_minimum_size = Vector2(110, 44)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_hover_color = Color(0.1, 0.1, 0.12, 1)
|
||||
theme_override_colors/font_color = Color(0.95, 0.95, 1, 1)
|
||||
theme_override_font_sizes/font_size = 13
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_button_hover")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_button_pressed")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_button_normal")
|
||||
text = "REFRESH"
|
||||
|
||||
[node name="JoinBtn" type="Button" parent="RoomListPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(120, 40)
|
||||
custom_minimum_size = Vector2(130, 44)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_hover_color = Color(0.1, 0.1, 0.12, 1)
|
||||
theme_override_colors/font_color = Color(0.95, 0.95, 1, 1)
|
||||
theme_override_font_sizes/font_size = 13
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_button_hover")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_button_pressed")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_button_normal")
|
||||
text = "JOIN SERVER"
|
||||
|
||||
[node name="BackBtn" type="Button" parent="RoomListPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(100, 40)
|
||||
custom_minimum_size = Vector2(110, 44)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_hover_color = Color(0.1, 0.1, 0.12, 1)
|
||||
theme_override_colors/font_color = Color(0.95, 0.95, 1, 1)
|
||||
theme_override_font_sizes/font_size = 13
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_button_hover")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_button_pressed")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_button_normal")
|
||||
text = "BACK"
|
||||
|
||||
[node name="LobbyPanel" type="PanelContainer" parent="."]
|
||||
@@ -306,21 +173,20 @@ anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -280.0
|
||||
offset_top = -240.0
|
||||
offset_right = 280.0
|
||||
offset_bottom = 240.0
|
||||
offset_left = -300.0
|
||||
offset_top = -260.0
|
||||
offset_right = 300.0
|
||||
offset_bottom = 260.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_panel")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="LobbyPanel"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 12
|
||||
theme_override_constants/separation = 14
|
||||
|
||||
[node name="RoomNameHeader" type="Label" parent="LobbyPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.95, 0.5, 0.15, 1)
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 26
|
||||
text = "ROOM: "
|
||||
horizontal_alignment = 1
|
||||
@@ -331,84 +197,57 @@ alignment = 1
|
||||
|
||||
[node name="MatchIdDisplay" type="Label" parent="LobbyPanel/VBoxContainer/MatchIdContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.45, 0.45, 0.5, 1)
|
||||
theme_override_colors/font_color = Color(0.5, 0.5, 0.55, 1)
|
||||
theme_override_font_sizes/font_size = 10
|
||||
text = "Match ID: "
|
||||
|
||||
[node name="CopyIdBtn" type="Button" parent="LobbyPanel/VBoxContainer/MatchIdContainer"]
|
||||
custom_minimum_size = Vector2(70, 24)
|
||||
custom_minimum_size = Vector2(80, 32)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_hover_color = Color(0.1, 0.1, 0.12, 1)
|
||||
theme_override_colors/font_color = Color(0.7, 0.7, 0.75, 1)
|
||||
theme_override_font_sizes/font_size = 10
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_button_hover")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_button_pressed")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_button_normal")
|
||||
text = "COPY"
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="LobbyPanel/VBoxContainer"]
|
||||
modulate = Color(0.9, 0.45, 0.1, 0.5)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="PlayersLabel" type="Label" parent="LobbyPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.6, 0.6, 0.65, 1)
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
theme_override_font_sizes/font_size = 13
|
||||
text = "PLAYERS"
|
||||
|
||||
[node name="PlayerList" type="ItemList" parent="LobbyPanel/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 140)
|
||||
custom_minimum_size = Vector2(0, 160)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_selected_color = Color(0.1, 0.1, 0.12, 1)
|
||||
theme_override_colors/font_color = Color(0.85, 0.85, 0.9, 1)
|
||||
theme_override_font_sizes/font_size = 14
|
||||
allow_reselect = true
|
||||
|
||||
[node name="StatusLabel" type="Label" parent="LobbyPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.95, 0.6, 0.2, 1)
|
||||
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
|
||||
theme_override_font_sizes/font_size = 14
|
||||
text = "Waiting for players..."
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="ButtonContainer" type="HBoxContainer" parent="LobbyPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 12
|
||||
theme_override_constants/separation = 14
|
||||
alignment = 1
|
||||
|
||||
[node name="ReadyBtn" type="Button" parent="LobbyPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(100, 44)
|
||||
custom_minimum_size = Vector2(110, 48)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_hover_color = Color(0.1, 0.1, 0.12, 1)
|
||||
theme_override_colors/font_color = Color(0.95, 0.95, 1, 1)
|
||||
theme_override_font_sizes/font_size = 14
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_button_hover")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_button_pressed")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_button_normal")
|
||||
toggle_mode = true
|
||||
text = "READY"
|
||||
|
||||
[node name="StartGameBtn" type="Button" parent="LobbyPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(130, 44)
|
||||
custom_minimum_size = Vector2(140, 48)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_hover_color = Color(0.1, 0.1, 0.12, 1)
|
||||
theme_override_colors/font_color = Color(0.95, 0.95, 1, 1)
|
||||
theme_override_font_sizes/font_size = 14
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_button_hover")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_button_pressed")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_button_normal")
|
||||
disabled = true
|
||||
text = "START GAME"
|
||||
|
||||
[node name="LeaveBtn" type="Button" parent="LobbyPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(100, 44)
|
||||
custom_minimum_size = Vector2(110, 48)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_hover_color = Color(0.1, 0.1, 0.12, 1)
|
||||
theme_override_colors/font_color = Color(0.95, 0.95, 1, 1)
|
||||
theme_override_font_sizes/font_size = 14
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_button_hover")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_button_pressed")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_button_normal")
|
||||
text = "LEAVE"
|
||||
|
||||
[node name="StatusBar" type="PanelContainer" parent="."]
|
||||
@@ -417,17 +256,16 @@ anchors_preset = 12
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 39.0
|
||||
offset_top = -83.0
|
||||
offset_right = -39.0
|
||||
offset_bottom = -26.0
|
||||
offset_left = 24.0
|
||||
offset_top = -72.0
|
||||
offset_right = -24.0
|
||||
offset_bottom = -24.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_panel")
|
||||
|
||||
[node name="ConnectionStatus" type="Label" parent="StatusBar"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.5, 0.5, 0.55, 1)
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "NOT CONNECTED"
|
||||
horizontal_alignment = 1
|
||||
@@ -437,12 +275,12 @@ layout_mode = 1
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -126.0
|
||||
offset_top = 19.0
|
||||
offset_right = -18.0
|
||||
offset_bottom = 37.0
|
||||
offset_left = -130.0
|
||||
offset_top = 20.0
|
||||
offset_right = -20.0
|
||||
offset_bottom = 40.0
|
||||
grow_horizontal = 0
|
||||
theme_override_colors/font_color = Color(0.35, 0.35, 0.4, 1)
|
||||
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 0.6)
|
||||
theme_override_font_sizes/font_size = 11
|
||||
text = "v0.1.0 ALPHA"
|
||||
horizontal_alignment = 2
|
||||
|
||||
@@ -0,0 +1,250 @@
|
||||
[gd_resource type="Theme" load_steps=17 format=3 uid="uid://da337sh5qxi0s"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_button_disabled"]
|
||||
content_margin_left = 16.0
|
||||
content_margin_top = 12.0
|
||||
content_margin_right = 16.0
|
||||
content_margin_bottom = 12.0
|
||||
bg_color = Color(0.4, 0.4, 0.4, 1)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.5, 0.5, 0.5, 1)
|
||||
corner_radius_top_left = 6
|
||||
corner_radius_top_right = 6
|
||||
corner_radius_bottom_right = 6
|
||||
corner_radius_bottom_left = 6
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_button_hover"]
|
||||
content_margin_left = 16.0
|
||||
content_margin_top = 12.0
|
||||
content_margin_right = 16.0
|
||||
content_margin_bottom = 12.0
|
||||
bg_color = Color(0.969, 0.651, 0.2, 1)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.992, 0.796, 0.047, 1)
|
||||
corner_radius_top_left = 6
|
||||
corner_radius_top_right = 6
|
||||
corner_radius_bottom_right = 6
|
||||
corner_radius_bottom_left = 6
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_button_normal"]
|
||||
content_margin_left = 16.0
|
||||
content_margin_top = 12.0
|
||||
content_margin_right = 16.0
|
||||
content_margin_bottom = 12.0
|
||||
bg_color = Color(0.929, 0.808, 0.541, 1)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.992, 0.796, 0.047, 1)
|
||||
corner_radius_top_left = 6
|
||||
corner_radius_top_right = 6
|
||||
corner_radius_bottom_right = 6
|
||||
corner_radius_bottom_left = 6
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_button_pressed"]
|
||||
content_margin_left = 16.0
|
||||
content_margin_top = 12.0
|
||||
content_margin_right = 16.0
|
||||
content_margin_bottom = 12.0
|
||||
bg_color = Color(0.647, 0.996, 0.224, 1)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.992, 0.796, 0.047, 1)
|
||||
corner_radius_top_left = 6
|
||||
corner_radius_top_right = 6
|
||||
corner_radius_bottom_right = 6
|
||||
corner_radius_bottom_left = 6
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_separator"]
|
||||
content_margin_top = 2.0
|
||||
content_margin_bottom = 2.0
|
||||
bg_color = Color(0.992, 0.796, 0.047, 0.5)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_slider_fill"]
|
||||
bg_color = Color(0.82, 0.882, 0.18, 1)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_slider_bg"]
|
||||
content_margin_left = 4.0
|
||||
content_margin_top = 4.0
|
||||
content_margin_right = 4.0
|
||||
content_margin_bottom = 4.0
|
||||
bg_color = Color(0.69, 0.573, 0.459, 1)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_panel_bg"]
|
||||
content_margin_left = 16.0
|
||||
content_margin_top = 16.0
|
||||
content_margin_right = 16.0
|
||||
content_margin_bottom = 16.0
|
||||
bg_color = Color(1, 0.953, 0.78, 1)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.992, 0.796, 0.047, 1)
|
||||
corner_radius_top_left = 8
|
||||
corner_radius_top_right = 8
|
||||
corner_radius_bottom_right = 8
|
||||
corner_radius_bottom_left = 8
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_input_focus"]
|
||||
content_margin_left = 12.0
|
||||
content_margin_top = 10.0
|
||||
content_margin_right = 12.0
|
||||
content_margin_bottom = 10.0
|
||||
bg_color = Color(1, 1, 0.9, 1)
|
||||
border_width_left = 3
|
||||
border_width_top = 3
|
||||
border_width_right = 3
|
||||
border_width_bottom = 3
|
||||
border_color = Color(0.647, 0.996, 0.224, 1)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_input_normal"]
|
||||
content_margin_left = 12.0
|
||||
content_margin_top = 10.0
|
||||
content_margin_right = 12.0
|
||||
content_margin_bottom = 10.0
|
||||
bg_color = Color(1, 0.953, 0.78, 1)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.992, 0.796, 0.047, 1)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dropdown_normal"]
|
||||
content_margin_left = 12.0
|
||||
content_margin_top = 8.0
|
||||
content_margin_right = 12.0
|
||||
content_margin_bottom = 8.0
|
||||
bg_color = Color(0.929, 0.773, 0.541, 1)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.992, 0.796, 0.047, 1)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_popup_panel"]
|
||||
content_margin_left = 8.0
|
||||
content_margin_top = 8.0
|
||||
content_margin_right = 8.0
|
||||
content_margin_bottom = 8.0
|
||||
bg_color = Color(0.929, 0.773, 0.541, 1)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.992, 0.796, 0.047, 1)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_progress_bg"]
|
||||
bg_color = Color(0.69, 0.573, 0.459, 1)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_progress_fill"]
|
||||
bg_color = Color(0.82, 0.882, 0.18, 1)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tab_selected"]
|
||||
content_margin_left = 12.0
|
||||
content_margin_top = 8.0
|
||||
content_margin_right = 12.0
|
||||
content_margin_bottom = 8.0
|
||||
bg_color = Color(0.647, 0.996, 0.224, 1)
|
||||
border_color = Color(0.992, 0.796, 0.047, 1)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tab_unselected"]
|
||||
content_margin_left = 12.0
|
||||
content_margin_top = 8.0
|
||||
content_margin_right = 12.0
|
||||
content_margin_bottom = 8.0
|
||||
bg_color = Color(0.929, 0.808, 0.541, 1)
|
||||
border_color = Color(0.992, 0.796, 0.047, 1)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
|
||||
[resource]
|
||||
Button/colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
Button/colors/font_disabled_color = Color(0.6, 0.6, 0.6, 1)
|
||||
Button/colors/font_hover_color = Color(1, 1, 1, 1)
|
||||
Button/colors/font_pressed_color = Color(0.2, 0.2, 0.2, 1)
|
||||
Button/font_sizes/font_size = 16
|
||||
Button/styles/disabled = SubResource("StyleBoxFlat_button_disabled")
|
||||
Button/styles/hover = SubResource("StyleBoxFlat_button_hover")
|
||||
Button/styles/normal = SubResource("StyleBoxFlat_button_normal")
|
||||
Button/styles/pressed = SubResource("StyleBoxFlat_button_pressed")
|
||||
CheckBox/colors/font_color = Color(1, 1, 1, 1)
|
||||
CheckBox/colors/font_hover_color = Color(0.647, 0.996, 0.224, 1)
|
||||
CheckBox/colors/font_pressed_color = Color(0.969, 0.651, 0.2, 1)
|
||||
HSeparator/styles/separator = SubResource("StyleBoxFlat_separator")
|
||||
HSlider/colors/font_color = Color(0.969, 0.651, 0.2, 1)
|
||||
HSlider/styles/grabber_area = SubResource("StyleBoxFlat_slider_fill")
|
||||
HSlider/styles/slider = SubResource("StyleBoxFlat_slider_bg")
|
||||
ItemList/colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
ItemList/colors/font_selected_color = Color(1, 1, 1, 1)
|
||||
ItemList/styles/panel = SubResource("StyleBoxFlat_panel_bg")
|
||||
Label/colors/font_color = Color(1, 1, 1, 1)
|
||||
Label/font_sizes/font_size = 14
|
||||
LineEdit/colors/caret_color = Color(0.647, 0.996, 0.224, 1)
|
||||
LineEdit/colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
LineEdit/colors/font_placeholder_color = Color(0.5, 0.45, 0.35, 0.6)
|
||||
LineEdit/font_sizes/font_size = 14
|
||||
LineEdit/styles/focus = SubResource("StyleBoxFlat_input_focus")
|
||||
LineEdit/styles/normal = SubResource("StyleBoxFlat_input_normal")
|
||||
LinkButton/colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
LinkButton/colors/font_hover_color = Color(0.992, 0.796, 0.047, 1)
|
||||
LinkButton/colors/font_pressed_color = Color(1, 1, 1, 1)
|
||||
OptionButton/colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
OptionButton/colors/font_hover_color = Color(1, 1, 1, 1)
|
||||
OptionButton/styles/hover = SubResource("StyleBoxFlat_button_hover")
|
||||
OptionButton/styles/normal = SubResource("StyleBoxFlat_dropdown_normal")
|
||||
OptionButton/styles/pressed = SubResource("StyleBoxFlat_button_pressed")
|
||||
PanelContainer/styles/panel = SubResource("StyleBoxFlat_panel_bg")
|
||||
PopupMenu/colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
PopupMenu/colors/font_hover_color = Color(1, 1, 1, 1)
|
||||
PopupMenu/styles/panel = SubResource("StyleBoxFlat_popup_panel")
|
||||
ProgressBar/styles/background = SubResource("StyleBoxFlat_progress_bg")
|
||||
ProgressBar/styles/fill = SubResource("StyleBoxFlat_progress_fill")
|
||||
TabContainer/colors/font_selected_color = Color(0.2, 0.2, 0.2, 1)
|
||||
TabContainer/colors/font_unselected_color = Color(0.69, 0.529, 0.357, 1)
|
||||
TabContainer/styles/panel = SubResource("StyleBoxFlat_panel_bg")
|
||||
TabContainer/styles/tab_selected = SubResource("StyleBoxFlat_tab_selected")
|
||||
TabContainer/styles/tab_unselected = SubResource("StyleBoxFlat_tab_unselected")
|
||||
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b048nsl527nah"
|
||||
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.svg"
|
||||
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
@@ -1,37 +1,22 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://launcher_main"]
|
||||
[gd_scene load_steps=12 format=3 uid="uid://lwtn5sbr5jr2"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/launcher_main.gd" id="1"]
|
||||
[ext_resource type="Script" path="res://scripts/version_checker.gd" id="2"]
|
||||
[ext_resource type="Script" path="res://scripts/download_manager.gd" id="3"]
|
||||
[ext_resource type="Script" path="res://scripts/update_applier.gd" id="4"]
|
||||
[ext_resource type="Script" path="res://scripts/news_fetcher.gd" id="5"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bg"]
|
||||
bg_color = Color(0.039, 0.039, 0.102, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_panel"]
|
||||
bg_color = Color(0.078, 0.078, 0.157, 1)
|
||||
corner_radius_top_left = 12
|
||||
corner_radius_top_right = 12
|
||||
corner_radius_bottom_right = 12
|
||||
corner_radius_bottom_left = 12
|
||||
[ext_resource type="Script" uid="uid://cvstgaigwt0sj" path="res://scripts/launcher_main.gd" id="1"]
|
||||
[ext_resource type="Script" uid="uid://ptdurqksg1sv" path="res://scripts/version_checker.gd" id="2"]
|
||||
[ext_resource type="Script" uid="uid://cer12vb230kfw" path="res://scripts/download_manager.gd" id="3"]
|
||||
[ext_resource type="Script" uid="uid://n2ptlbblexo6" path="res://scripts/update_applier.gd" id="4"]
|
||||
[ext_resource type="Script" uid="uid://coer7l074xm6x" path="res://scripts/news_fetcher.gd" id="5"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_titlebar"]
|
||||
bg_color = Color(0.059, 0.059, 0.118, 1)
|
||||
corner_radius_top_left = 12
|
||||
corner_radius_top_right = 12
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_button"]
|
||||
bg_color = Color(0, 0.831, 1, 1)
|
||||
corner_radius_top_left = 8
|
||||
corner_radius_top_right = 8
|
||||
corner_radius_bottom_right = 8
|
||||
corner_radius_bottom_left = 8
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_button_hover"]
|
||||
bg_color = Color(0.2, 0.9, 1, 1)
|
||||
corner_radius_top_left = 8
|
||||
corner_radius_top_right = 8
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tab_panel"]
|
||||
content_margin_left = 8.0
|
||||
content_margin_top = 8.0
|
||||
content_margin_right = 8.0
|
||||
content_margin_bottom = 8.0
|
||||
bg_color = Color(0.059, 0.059, 0.118, 1)
|
||||
corner_radius_bottom_right = 8
|
||||
corner_radius_bottom_left = 8
|
||||
|
||||
@@ -49,14 +34,19 @@ corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tab_panel"]
|
||||
bg_color = Color(0.059, 0.059, 0.118, 1)
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_button_hover"]
|
||||
bg_color = Color(0.2, 0.9, 1, 1)
|
||||
corner_radius_top_left = 8
|
||||
corner_radius_top_right = 8
|
||||
corner_radius_bottom_right = 8
|
||||
corner_radius_bottom_left = 8
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_button"]
|
||||
bg_color = Color(0, 0.831, 1, 1)
|
||||
corner_radius_top_left = 8
|
||||
corner_radius_top_right = 8
|
||||
corner_radius_bottom_right = 8
|
||||
corner_radius_bottom_left = 8
|
||||
content_margin_left = 8.0
|
||||
content_margin_top = 8.0
|
||||
content_margin_right = 8.0
|
||||
content_margin_bottom = 8.0
|
||||
|
||||
[node name="Launcher" type="Control"]
|
||||
layout_mode = 3
|
||||
@@ -65,7 +55,6 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_bg")
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="Background" type="ColorRect" parent="."]
|
||||
@@ -73,6 +62,8 @@ layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.039, 0.039, 0.102, 1)
|
||||
|
||||
[node name="VersionChecker" type="Node" parent="."]
|
||||
@@ -87,7 +78,7 @@ script = ExtResource("4")
|
||||
[node name="NewsFetcher" type="Node" parent="."]
|
||||
script = ExtResource("5")
|
||||
|
||||
[node name="MainPanel" type="PanelContainer" parent="."]
|
||||
[node name="MainPanel" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
@@ -96,39 +87,35 @@ offset_left = 20.0
|
||||
offset_top = 20.0
|
||||
offset_right = -20.0
|
||||
offset_bottom = -20.0
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_panel")
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="TitleBar" type="PanelContainer" parent="MainPanel"]
|
||||
custom_minimum_size = Vector2(0, 60)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 0
|
||||
custom_minimum_size = Vector2(0, 60)
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_titlebar")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MainPanel/TitleBar"]
|
||||
layout_mode = 2
|
||||
offset_left = 16.0
|
||||
offset_right = -16.0
|
||||
|
||||
[node name="TitleLabel" type="Label" parent="MainPanel/TitleBar/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "TEKTON LAUNCHER"
|
||||
theme_override_colors/font_color = Color(0, 0.831, 1, 1)
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "TEKTON LAUNCHER"
|
||||
|
||||
[node name="VersionLabel" type="Label" parent="MainPanel/TitleBar"]
|
||||
layout_mode = 2
|
||||
offset_left = 750.0
|
||||
offset_top = 20.0
|
||||
offset_right = 840.0
|
||||
offset_bottom = 40.0
|
||||
text = "v0.0.0"
|
||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
||||
text = "v0.0.0"
|
||||
horizontal_alignment = 2
|
||||
|
||||
[node name="ContentContainer" type="VBoxContainer" parent="MainPanel"]
|
||||
layout_mode = 2
|
||||
offset_top = 60.0
|
||||
size_flags_vertical = 3
|
||||
alignment = 1
|
||||
|
||||
[node name="TabContainer" type="TabContainer" parent="MainPanel/ContentContainer"]
|
||||
layout_mode = 2
|
||||
@@ -145,6 +132,8 @@ layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="NewsVBox" type="VBoxContainer" parent="MainPanel/ContentContainer/TabContainer/News/ScrollContainer"]
|
||||
layout_mode = 2
|
||||
@@ -161,6 +150,8 @@ layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="ChangelogVBox" type="VBoxContainer" parent="MainPanel/ContentContainer/TabContainer/Changelog/ScrollContainer"]
|
||||
layout_mode = 2
|
||||
@@ -168,39 +159,39 @@ size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="BottomBar" type="HBoxContainer" parent="MainPanel/ContentContainer"]
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 80)
|
||||
layout_mode = 2
|
||||
alignment = 2
|
||||
|
||||
[node name="StatusLabel" type="Label" parent="MainPanel/ContentContainer/BottomBar"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Checking for updates..."
|
||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
||||
text = "Checking for updates..."
|
||||
|
||||
[node name="ProgressContainer" type="VBoxContainer" parent="MainPanel/ContentContainer/BottomBar"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(200, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ProgressBar" type="ProgressBar" parent="MainPanel/ContentContainer/BottomBar/ProgressContainer"]
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(200, 20)
|
||||
layout_mode = 2
|
||||
theme_override_styles/background = SubResource("StyleBoxFlat_progress_bg")
|
||||
theme_override_styles/fill = SubResource("StyleBoxFlat_progress_fill")
|
||||
show_percentage = false
|
||||
|
||||
[node name="ProgressLabel" type="Label" parent="MainPanel/ContentContainer/BottomBar/ProgressContainer"]
|
||||
layout_mode = 2
|
||||
text = "0%"
|
||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
||||
text = "0%"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="PlayButton" type="Button" parent="MainPanel/ContentContainer/BottomBar"]
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(160, 50)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.039, 0.039, 0.102, 1)
|
||||
theme_override_font_sizes/font_size = 18
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_button")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_button_hover")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_button")
|
||||
text = "► PLAY"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
uid://huq4exk8psgu
|
||||
@@ -0,0 +1 @@
|
||||
uid://cer12vb230kfw
|
||||
@@ -0,0 +1 @@
|
||||
uid://cvstgaigwt0sj
|
||||
@@ -0,0 +1 @@
|
||||
uid://coer7l074xm6x
|
||||
@@ -8,7 +8,7 @@ signal update_completed
|
||||
signal update_failed(error: String)
|
||||
signal rollback_completed
|
||||
|
||||
const BACKUP_COUNT := 2 # Keep this many backup versions
|
||||
const BACKUP_COUNT := 2 # Keep this many backup versions
|
||||
|
||||
func apply_update(downloaded_pck_path: String, version: String) -> void:
|
||||
emit_signal("update_started")
|
||||
@@ -91,7 +91,7 @@ func _copy_file(from: String, to: String) -> bool:
|
||||
return false
|
||||
|
||||
# Copy in chunks for large files
|
||||
const CHUNK_SIZE := 1024 * 1024 # 1MB chunks
|
||||
const CHUNK_SIZE := 1024 * 1024 # 1MB chunks
|
||||
while source.get_position() < source.get_length():
|
||||
var chunk := source.get_buffer(CHUNK_SIZE)
|
||||
dest.store_buffer(chunk)
|
||||
@@ -121,7 +121,7 @@ func _cleanup_old_backups(backup_dir: String, keep_count: int) -> void:
|
||||
|
||||
# Remove oldest backups if we have too many
|
||||
while backups.size() > keep_count:
|
||||
var old_backup := backups.pop_front()
|
||||
var old_backup = backups.pop_front()
|
||||
dir.remove(old_backup)
|
||||
print("[UpdateApplier] Removed old backup: ", old_backup)
|
||||
|
||||
@@ -151,7 +151,7 @@ func rollback_to_backup() -> bool:
|
||||
return false
|
||||
|
||||
backups.sort()
|
||||
var latest_backup := backups.back()
|
||||
var latest_backup = backups.back()
|
||||
|
||||
# Restore the backup
|
||||
if _copy_file(backup_dir + latest_backup, game_dir + pck_name):
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
uid://n2ptlbblexo6
|
||||
@@ -0,0 +1 @@
|
||||
uid://ptdurqksg1sv
|
||||
+1
-1
@@ -11,7 +11,7 @@ config_version=5
|
||||
[application]
|
||||
|
||||
config/name="tekton-local"
|
||||
run/main_scene="res://assets/models/meshes/lobby.tscn"
|
||||
run/main_scene="res://scenes/lobby.tscn"
|
||||
config/features=PackedStringArray("4.4", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
|
||||
+34
-17
@@ -1,12 +1,16 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://boot_screen"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://cyfjwldknv8m6"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/ui/boot_screen.gd" id="1"]
|
||||
[ext_resource type="Script" uid="uid://vgyrq5y5p7jw" path="res://scripts/ui/boot_screen.gd" id="1"]
|
||||
[ext_resource type="Theme" uid="uid://da337sh5qxi0s" path="res://assets/themes/ui_theme.tres" id="2"]
|
||||
|
||||
[node name="BootScreen" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("2")
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="Background" type="ColorRect" parent="."]
|
||||
@@ -14,29 +18,39 @@ layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
color = Color(0.039, 0.039, 0.102, 1)
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.12, 0.1, 0.08, 1)
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 20
|
||||
theme_override_constants/separation = 24
|
||||
|
||||
[node name="Logo" type="Label" parent="CenterContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0, 0.831, 1, 1)
|
||||
theme_override_font_sizes/font_size = 48
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 52
|
||||
text = "TEKTON"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Subtitle" type="Label" parent="CenterContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
|
||||
theme_override_font_sizes/font_size = 14
|
||||
text = "ARMAGEDDON"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="StatusLabel" type="Label" parent="CenterContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "Checking for updates..."
|
||||
horizontal_alignment = 1
|
||||
@@ -45,17 +59,17 @@ horizontal_alignment = 1
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="ProgressBar" type="ProgressBar" parent="CenterContainer/VBoxContainer/ProgressContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(320, 24)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(300, 20)
|
||||
show_percentage = false
|
||||
|
||||
[node name="ProgressLabel" type="Label" parent="CenterContainer/VBoxContainer/ProgressContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
||||
text = "0%"
|
||||
horizontal_alignment = 1
|
||||
|
||||
@@ -63,25 +77,26 @@ horizontal_alignment = 1
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 16
|
||||
alignment = 1
|
||||
|
||||
[node name="UpdateButton" type="Button" parent="CenterContainer/VBoxContainer/ButtonContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(160, 48)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(140, 40)
|
||||
text = "Update Now"
|
||||
|
||||
[node name="SkipButton" type="Button" parent="CenterContainer/VBoxContainer/ButtonContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(160, 48)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(140, 40)
|
||||
text = "Play Anyway"
|
||||
|
||||
[node name="StoreButton" type="Button" parent="CenterContainer/VBoxContainer/ButtonContainer"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(160, 48)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(140, 40)
|
||||
text = "Open Store"
|
||||
|
||||
[node name="VersionLabel" type="Label" parent="."]
|
||||
@@ -91,11 +106,13 @@ anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -100.0
|
||||
offset_top = -30.0
|
||||
offset_right = -10.0
|
||||
offset_bottom = -10.0
|
||||
theme_override_colors/font_color = Color(0.4, 0.4, 0.5, 1)
|
||||
offset_left = -120.0
|
||||
offset_top = -40.0
|
||||
offset_right = -16.0
|
||||
offset_bottom = -16.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 0.6)
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "v1.0.0"
|
||||
horizontal_alignment = 2
|
||||
|
||||
+50
-3
@@ -31,6 +31,7 @@ extends Control
|
||||
# UI References - User Profile Bar (will be added to scene)
|
||||
var user_profile_bar: Control
|
||||
var profile_panel_instance: Control
|
||||
var admin_panel_instance: Control
|
||||
|
||||
# Store current match ID for copy function
|
||||
var current_match_id: String = ""
|
||||
@@ -38,8 +39,8 @@ var current_match_id: String = ""
|
||||
func _ready():
|
||||
# Check if user is authenticated
|
||||
if not AuthManager.is_logged_in():
|
||||
# Redirect to login screen
|
||||
get_tree().change_scene_to_file("res://scenes/ui/login_screen.tscn")
|
||||
# Redirect to login screen - must use deferred call during _ready()
|
||||
call_deferred("_go_to_login")
|
||||
return
|
||||
|
||||
# Initialize user profile bar
|
||||
@@ -125,6 +126,14 @@ func _create_profile_bar() -> Control:
|
||||
profile_btn.pressed.connect(_on_profile_btn_pressed)
|
||||
bar.add_child(profile_btn)
|
||||
|
||||
# Admin button (only visible for admins/hosts)
|
||||
var admin_btn := Button.new()
|
||||
admin_btn.name = "AdminBtn"
|
||||
admin_btn.text = "Admin"
|
||||
admin_btn.visible = false # Hidden by default, shown if user is admin
|
||||
admin_btn.pressed.connect(_on_admin_btn_pressed)
|
||||
bar.add_child(admin_btn)
|
||||
|
||||
# Logout button
|
||||
var logout_btn := Button.new()
|
||||
logout_btn.name = "LogoutBtn"
|
||||
@@ -151,6 +160,13 @@ func _update_profile_bar() -> void:
|
||||
var avatar_url := UserProfileManager.get_avatar_url()
|
||||
if ResourceLoader.exists(avatar_url):
|
||||
avatar.texture = load(avatar_url)
|
||||
|
||||
# Show admin button if user is admin or host
|
||||
var admin_btn := user_profile_bar.get_node_or_null("AdminBtn") as Button
|
||||
if admin_btn:
|
||||
# Check if user is admin (you can define admin check logic here)
|
||||
var is_admin = _check_if_admin()
|
||||
admin_btn.visible = is_admin
|
||||
|
||||
func _on_profile_btn_pressed() -> void:
|
||||
# Show profile panel
|
||||
@@ -167,7 +183,38 @@ func _on_profile_btn_pressed() -> void:
|
||||
|
||||
func _on_logout_pressed() -> void:
|
||||
AuthManager.logout()
|
||||
get_tree().change_scene_to_file("res://scenes/ui/login_screen.tscn")
|
||||
_go_to_login()
|
||||
|
||||
func _go_to_login() -> void:
|
||||
if get_tree():
|
||||
get_tree().change_scene_to_file("res://scenes/ui/login_screen.tscn")
|
||||
|
||||
func _on_admin_btn_pressed() -> void:
|
||||
# Show admin panel
|
||||
if not admin_panel_instance:
|
||||
var admin_panel_scene := load("res://scenes/ui/admin_panel.tscn")
|
||||
admin_panel_instance = admin_panel_scene.instantiate()
|
||||
# Connect close signal if available
|
||||
if admin_panel_instance.has_signal("closed"):
|
||||
admin_panel_instance.closed.connect(func(): admin_panel_instance.hide())
|
||||
add_child(admin_panel_instance)
|
||||
|
||||
admin_panel_instance.show()
|
||||
# Center the panel
|
||||
admin_panel_instance.position = (get_viewport_rect().size - admin_panel_instance.size) / 2
|
||||
|
||||
func _check_if_admin() -> bool:
|
||||
# Check if user is admin - can be host or have specific admin role
|
||||
# You can extend this to check Nakama user metadata or roles
|
||||
if LobbyManager.is_host:
|
||||
return true
|
||||
|
||||
# Check if user has admin role in their profile (optional)
|
||||
var user_id = AuthManager.get_user_id() if AuthManager.has_method("get_user_id") else ""
|
||||
# Add your admin user IDs here or check from Nakama metadata
|
||||
var admin_user_ids = ["admin_user_id_1", "admin_user_id_2"] # Configure as needed
|
||||
|
||||
return user_id in admin_user_ids
|
||||
|
||||
# =============================================================================
|
||||
# Panel Management
|
||||
|
||||
@@ -0,0 +1,286 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://b7nxt2hc4kqp8"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b5q6yekyk0tld" path="res://scenes/lobby.gd" id="1_lp6xi"]
|
||||
[ext_resource type="Theme" uid="uid://da337sh5qxi0s" path="res://assets/themes/ui_theme.tres" id="2_theme"]
|
||||
|
||||
[node name="Lobby" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("2_theme")
|
||||
script = ExtResource("1_lp6xi")
|
||||
|
||||
[node name="Background" type="ColorRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.12, 0.1, 0.08, 1)
|
||||
|
||||
[node name="MainMenuPanel" type="PanelContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
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
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MainMenuPanel"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 18
|
||||
|
||||
[node name="TitleContainer" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 4
|
||||
|
||||
[node name="Title" type="Label" parent="MainMenuPanel/VBoxContainer/TitleContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 44
|
||||
text = "TEKTON DASH"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Subtitle" type="Label" parent="MainMenuPanel/VBoxContainer/TitleContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "ARMAGEDDON VERSION"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Separator" type="HSeparator" parent="MainMenuPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="InputSection" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="PlayerNameLabel" type="Label" parent="MainMenuPanel/VBoxContainer/InputSection"]
|
||||
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"]
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
text = "Player"
|
||||
placeholder_text = "Enter your name..."
|
||||
|
||||
[node name="ButtonSection" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 12
|
||||
|
||||
[node name="CreateRoomBtn" type="Button" parent="MainMenuPanel/VBoxContainer/ButtonSection"]
|
||||
custom_minimum_size = Vector2(0, 48)
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "CREATE ROOM"
|
||||
|
||||
[node name="BrowseRoomsBtn" type="Button" parent="MainMenuPanel/VBoxContainer/ButtonSection"]
|
||||
custom_minimum_size = Vector2(0, 48)
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "BROWSE ROOMS"
|
||||
|
||||
[node name="RoomListPanel" type="PanelContainer" parent="."]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -300.0
|
||||
offset_top = -260.0
|
||||
offset_right = 300.0
|
||||
offset_bottom = 260.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="RoomListPanel"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 14
|
||||
|
||||
[node name="Header" type="Label" parent="RoomListPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 28
|
||||
text = "SERVER BROWSER"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="RoomListPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MatchIdLabel" type="Label" parent="RoomListPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "DIRECT CONNECT (MATCH ID)"
|
||||
|
||||
[node name="MatchIdInput" type="LineEdit" parent="RoomListPanel/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
placeholder_text = "Paste match ID here..."
|
||||
|
||||
[node name="RoomListLabel" type="Label" parent="RoomListPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "AVAILABLE SERVERS"
|
||||
|
||||
[node name="RoomList" type="ItemList" parent="RoomListPanel/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 200)
|
||||
layout_mode = 2
|
||||
allow_reselect = true
|
||||
|
||||
[node name="ButtonContainer" type="HBoxContainer" parent="RoomListPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 14
|
||||
alignment = 1
|
||||
|
||||
[node name="RefreshBtn" type="Button" parent="RoomListPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(110, 44)
|
||||
layout_mode = 2
|
||||
text = "REFRESH"
|
||||
|
||||
[node name="JoinBtn" type="Button" parent="RoomListPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(130, 44)
|
||||
layout_mode = 2
|
||||
text = "JOIN SERVER"
|
||||
|
||||
[node name="BackBtn" type="Button" parent="RoomListPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(110, 44)
|
||||
layout_mode = 2
|
||||
text = "BACK"
|
||||
|
||||
[node name="LobbyPanel" type="PanelContainer" parent="."]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -300.0
|
||||
offset_top = -260.0
|
||||
offset_right = 300.0
|
||||
offset_bottom = 260.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="LobbyPanel"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 14
|
||||
|
||||
[node name="RoomNameHeader" type="Label" parent="LobbyPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 26
|
||||
text = "ROOM: "
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="MatchIdContainer" type="HBoxContainer" parent="LobbyPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="MatchIdDisplay" type="Label" parent="LobbyPanel/VBoxContainer/MatchIdContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.5, 0.5, 0.55, 1)
|
||||
theme_override_font_sizes/font_size = 10
|
||||
text = "Match ID: "
|
||||
|
||||
[node name="CopyIdBtn" type="Button" parent="LobbyPanel/VBoxContainer/MatchIdContainer"]
|
||||
custom_minimum_size = Vector2(80, 32)
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 10
|
||||
text = "COPY"
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="LobbyPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="PlayersLabel" type="Label" parent="LobbyPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
theme_override_font_sizes/font_size = 13
|
||||
text = "PLAYERS"
|
||||
|
||||
[node name="PlayerList" type="ItemList" parent="LobbyPanel/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 160)
|
||||
layout_mode = 2
|
||||
allow_reselect = true
|
||||
|
||||
[node name="StatusLabel" type="Label" parent="LobbyPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
|
||||
theme_override_font_sizes/font_size = 14
|
||||
text = "Waiting for players..."
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="ButtonContainer" type="HBoxContainer" parent="LobbyPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 14
|
||||
alignment = 1
|
||||
|
||||
[node name="ReadyBtn" type="Button" parent="LobbyPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(110, 48)
|
||||
layout_mode = 2
|
||||
toggle_mode = true
|
||||
text = "READY"
|
||||
|
||||
[node name="StartGameBtn" type="Button" parent="LobbyPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(140, 48)
|
||||
layout_mode = 2
|
||||
disabled = true
|
||||
text = "START GAME"
|
||||
|
||||
[node name="LeaveBtn" type="Button" parent="LobbyPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(110, 48)
|
||||
layout_mode = 2
|
||||
text = "LEAVE"
|
||||
|
||||
[node name="StatusBar" type="PanelContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 12
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 24.0
|
||||
offset_top = -72.0
|
||||
offset_right = -24.0
|
||||
offset_bottom = -24.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="ConnectionStatus" type="Label" parent="StatusBar"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "NOT CONNECTED"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="VersionLabel" type="Label" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -130.0
|
||||
offset_top = 20.0
|
||||
offset_right = -20.0
|
||||
offset_bottom = 40.0
|
||||
grow_horizontal = 0
|
||||
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 0.6)
|
||||
theme_override_font_sizes/font_size = 11
|
||||
text = "v0.1.0 ALPHA"
|
||||
horizontal_alignment = 2
|
||||
@@ -45,6 +45,49 @@ func _init_managers():
|
||||
add_child(obstacle_manager)
|
||||
obstacle_manager.initialize($EnhancedGridMap)
|
||||
|
||||
# Message Bar Configuration
|
||||
const MAX_MESSAGES := 5
|
||||
const MESSAGE_DURATION := 3.0
|
||||
|
||||
@onready var message_bar: PanelContainer = $MessageBar
|
||||
@onready var message_container: VBoxContainer = $MessageBar/MarginContainer/MessageContainer
|
||||
|
||||
func add_message_to_bar(player_name: String, message: String):
|
||||
if not message_container:
|
||||
return
|
||||
|
||||
# Create message label
|
||||
var label = Label.new()
|
||||
label.text = "[%s] %s" % [player_name, message]
|
||||
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
label.add_theme_color_override("font_color", Color.WHITE)
|
||||
label.add_theme_font_size_override("font_size", 14)
|
||||
|
||||
# Add to container
|
||||
message_container.add_child(label)
|
||||
|
||||
# Show the message bar
|
||||
message_bar.visible = true
|
||||
|
||||
# Remove oldest messages if over limit
|
||||
while message_container.get_child_count() > MAX_MESSAGES:
|
||||
var oldest = message_container.get_child(0)
|
||||
oldest.queue_free()
|
||||
|
||||
# Auto-remove after duration
|
||||
await get_tree().create_timer(MESSAGE_DURATION).timeout
|
||||
if is_instance_valid(label):
|
||||
label.queue_free()
|
||||
|
||||
# Hide bar when empty
|
||||
await get_tree().process_frame
|
||||
if message_container.get_child_count() == 0:
|
||||
message_bar.visible = false
|
||||
|
||||
@rpc("any_peer", "call_local")
|
||||
func broadcast_message(player_name: String, message: String):
|
||||
add_message_to_bar(player_name, message)
|
||||
|
||||
func _setup_obstacle_ui():
|
||||
var obstacle_button = Button.new()
|
||||
obstacle_button.text = "Place Obstacle"
|
||||
|
||||
@@ -9299,6 +9299,31 @@ offset_right = 24.0
|
||||
offset_bottom = 24.0
|
||||
texture = ExtResource("10_my1qp")
|
||||
|
||||
[node name="MessageBar" type="PanelContainer" parent="."]
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -200.0
|
||||
offset_top = -99.0
|
||||
offset_right = 200.0
|
||||
offset_bottom = -41.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
theme_override_styles/panel = ExtResource("5_dvx6y")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="MessageBar"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 10
|
||||
theme_override_constants/margin_top = 5
|
||||
theme_override_constants/margin_right = 10
|
||||
theme_override_constants/margin_bottom = 5
|
||||
|
||||
[node name="MessageContainer" type="VBoxContainer" parent="MessageBar/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 4
|
||||
|
||||
[connection signal="pressed" from="Menu/Host" to="." method="_on_host_pressed"]
|
||||
[connection signal="pressed" from="Menu/Join" to="." method="_on_join_pressed"]
|
||||
[connection signal="text_submitted" from="MessageInput" to="." method="_on_message_input_text_submitted"]
|
||||
|
||||
+5
-6
@@ -664,12 +664,11 @@ func remote_set_position(authority_position):
|
||||
|
||||
@rpc("any_peer", "call_local")
|
||||
func display_message(message):
|
||||
$Bubble.show()
|
||||
$Bubble/Message.show()
|
||||
$Bubble/Message.text = str(message)
|
||||
await get_tree().create_timer(3).timeout
|
||||
$Bubble.hide()
|
||||
$Bubble/Message.hide()
|
||||
# Send message to the main scene's message bar instead of player bubble
|
||||
var main = get_tree().get_root().get_node_or_null("Main")
|
||||
if main and main.has_method("add_message_to_bar"):
|
||||
var player_name = $Name.text.split("\n")[0] if $Name else str(name)
|
||||
main.add_message_to_bar(player_name, message)
|
||||
|
||||
func initialize_random_goals(_size: int, min_value: int, max_value: int, null_count: float) -> Array[int]:
|
||||
goals.clear()
|
||||
|
||||
+27
-12
@@ -1,16 +1,17 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://admin_panel"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://biio8efqysivs"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/ui/admin_panel.gd" id="1"]
|
||||
[ext_resource type="Script" uid="uid://ic8fg0o0p0i4" path="res://scripts/ui/admin_panel.gd" id="1"]
|
||||
[ext_resource type="Theme" uid="uid://da337sh5qxi0s" path="res://assets/themes/ui_theme.tres" id="2"]
|
||||
|
||||
[node name="AdminPanel" type="PanelContainer"]
|
||||
anchors_preset = 0
|
||||
offset_right = 450.0
|
||||
offset_bottom = 500.0
|
||||
offset_right = 480.0
|
||||
offset_bottom = 520.0
|
||||
theme = ExtResource("2")
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="VBox" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
theme_override_constants/separation = 12
|
||||
|
||||
[node name="Header" type="HBoxContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
@@ -18,47 +19,53 @@ layout_mode = 2
|
||||
[node name="Title" type="Label" parent="VBox/Header"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_colors/font_color = Color(1, 0.4, 0.4, 1)
|
||||
theme_override_font_sizes/font_size = 20
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 22
|
||||
text = "⚙ Admin Panel"
|
||||
|
||||
[node name="CloseButton" type="Button" parent="VBox/Header"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(36, 36)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(30, 30)
|
||||
text = "✕"
|
||||
|
||||
[node name="TabContainer" type="TabContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
current_tab = 0
|
||||
|
||||
[node name="Players" type="VBoxContainer" parent="VBox/TabContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
metadata/_tab_index = 0
|
||||
|
||||
[node name="PlayerList" type="ItemList" parent="VBox/TabContainer/Players"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 180)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
custom_minimum_size = Vector2(0, 150)
|
||||
|
||||
[node name="PlayerActions" type="HBoxContainer" parent="VBox/TabContainer/Players"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="KickBtn" type="Button" parent="VBox/TabContainer/Players/PlayerActions"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Kick"
|
||||
|
||||
[node name="BanBtn" type="Button" parent="VBox/TabContainer/Players/PlayerActions"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Ban"
|
||||
|
||||
[node name="MuteBtn" type="Button" parent="VBox/TabContainer/Players/PlayerActions"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Mute"
|
||||
@@ -66,6 +73,7 @@ text = "Mute"
|
||||
[node name="Server" type="VBoxContainer" parent="VBox/TabContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
metadata/_tab_index = 1
|
||||
|
||||
[node name="StatsGrid" type="GridContainer" parent="VBox/TabContainer/Server"]
|
||||
@@ -79,6 +87,7 @@ text = "Connected Players:"
|
||||
[node name="PlayerCount" type="Label" parent="VBox/TabContainer/Server/StatsGrid"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
text = "0"
|
||||
|
||||
[node name="Label2" type="Label" parent="VBox/TabContainer/Server/StatsGrid"]
|
||||
@@ -88,6 +97,7 @@ text = "Match ID:"
|
||||
[node name="MatchIdLabel" type="Label" parent="VBox/TabContainer/Server/StatsGrid"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
|
||||
text = "N/A"
|
||||
|
||||
[node name="Label3" type="Label" parent="VBox/TabContainer/Server/StatsGrid"]
|
||||
@@ -97,35 +107,40 @@ text = "Server Status:"
|
||||
[node name="ServerStatus" type="Label" parent="VBox/TabContainer/Server/StatsGrid"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0, 1, 0.5, 1)
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
text = "Running"
|
||||
|
||||
[node name="ServerActions" type="VBoxContainer" parent="VBox/TabContainer/Server"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="EndMatchBtn" type="Button" parent="VBox/TabContainer/Server/ServerActions"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
text = "End Match"
|
||||
|
||||
[node name="RestartMatchBtn" type="Button" parent="VBox/TabContainer/Server/ServerActions"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
text = "Restart Match"
|
||||
|
||||
[node name="Bans" type="VBoxContainer" parent="VBox/TabContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
metadata/_tab_index = 2
|
||||
|
||||
[node name="BanList" type="ItemList" parent="VBox/TabContainer/Bans"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 180)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
custom_minimum_size = Vector2(0, 150)
|
||||
|
||||
[node name="UnbanBtn" type="Button" parent="VBox/TabContainer/Bans"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
text = "Unban Selected"
|
||||
|
||||
|
||||
+45
-36
@@ -1,12 +1,16 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://login_screen"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://b00eef4tqt2ri"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/ui/login_screen.gd" id="1"]
|
||||
[ext_resource type="Script" uid="uid://b1lcy1ikdkknq" path="res://scripts/ui/login_screen.gd" id="1"]
|
||||
[ext_resource type="Theme" uid="uid://da337sh5qxi0s" path="res://assets/themes/ui_theme.tres" id="2"]
|
||||
|
||||
[node name="LoginScreen" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("2")
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="Background" type="ColorRect" parent="."]
|
||||
@@ -14,17 +18,21 @@ layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
color = Color(0.039, 0.039, 0.102, 1)
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.12, 0.1, 0.08, 1)
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="MainPanel" type="PanelContainer" parent="CenterContainer"]
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(400, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBox" type="VBoxContainer" parent="CenterContainer/MainPanel"]
|
||||
layout_mode = 2
|
||||
@@ -32,49 +40,49 @@ theme_override_constants/separation = 16
|
||||
|
||||
[node name="LogoLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0, 0.831, 1, 1)
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 48
|
||||
text = "TEKTON"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="SubtitleLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
||||
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
|
||||
theme_override_font_sizes/font_size = 14
|
||||
text = "Tactical Multiplayer"
|
||||
text = "Armageddon"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Spacer1" type="Control" parent="CenterContainer/MainPanel/VBox"]
|
||||
custom_minimum_size = Vector2(0, 16)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 20)
|
||||
|
||||
[node name="GuestButton" type="Button" parent="CenterContainer/MainPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 52)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 50)
|
||||
theme_override_font_sizes/font_size = 18
|
||||
text = "▶ PLAY AS GUEST"
|
||||
|
||||
[node name="Spacer2" type="Control" parent="CenterContainer/MainPanel/VBox"]
|
||||
custom_minimum_size = Vector2(0, 8)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 10)
|
||||
|
||||
[node name="OrLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.4, 0.4, 0.5, 1)
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
text = "─────── or sign in ───────"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="EmailInput" type="LineEdit" parent="CenterContainer/MainPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
placeholder_text = "Email"
|
||||
|
||||
[node name="PasswordInput" type="LineEdit" parent="CenterContainer/MainPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
placeholder_text = "Password"
|
||||
secret = true
|
||||
|
||||
@@ -86,46 +94,46 @@ text = "Remember me"
|
||||
|
||||
[node name="LoginButton" type="Button" parent="CenterContainer/MainPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 48)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 45)
|
||||
text = "Sign In"
|
||||
|
||||
[node name="RegisterLink" type="LinkButton" parent="CenterContainer/MainPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Don't have an account? Register"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Spacer3" type="Control" parent="CenterContainer/MainPanel/VBox"]
|
||||
custom_minimum_size = Vector2(0, 8)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 10)
|
||||
|
||||
[node name="SocialLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.4, 0.4, 0.5, 1)
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
text = "─────── or continue with ───────"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="SocialButtons" type="HBoxContainer" parent="CenterContainer/MainPanel/VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 12
|
||||
alignment = 1
|
||||
|
||||
[node name="GoogleButton" type="Button" parent="CenterContainer/MainPanel/VBox/SocialButtons"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(100, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(100, 40)
|
||||
text = "Google"
|
||||
|
||||
[node name="AppleButton" type="Button" parent="CenterContainer/MainPanel/VBox/SocialButtons"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(100, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(100, 40)
|
||||
text = "Apple"
|
||||
|
||||
[node name="FacebookButton" type="Button" parent="CenterContainer/MainPanel/VBox/SocialButtons"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(100, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(100, 40)
|
||||
text = "Facebook"
|
||||
|
||||
[node name="StatusLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
||||
@@ -138,15 +146,15 @@ autowrap_mode = 2
|
||||
[node name="LoadingSpinner" type="TextureProgressBar" parent="CenterContainer/MainPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(40, 40)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="RegistrationPanel" type="PanelContainer" parent="CenterContainer"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(400, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBox" type="VBoxContainer" parent="CenterContainer/RegistrationPanel"]
|
||||
layout_mode = 2
|
||||
@@ -154,63 +162,62 @@ theme_override_constants/separation = 12
|
||||
|
||||
[node name="Title" type="Label" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0, 0.831, 1, 1)
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "Create Account"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="RegEmailInput" type="LineEdit" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
placeholder_text = "Email"
|
||||
|
||||
[node name="RegUsernameInput" type="LineEdit" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
placeholder_text = "Username"
|
||||
|
||||
[node name="RegPasswordInput" type="LineEdit" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
placeholder_text = "Password"
|
||||
secret = true
|
||||
|
||||
[node name="RegConfirmPasswordInput" type="LineEdit" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
placeholder_text = "Confirm Password"
|
||||
secret = true
|
||||
|
||||
[node name="PasswordStrength" type="ProgressBar" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 12)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 8)
|
||||
max_value = 4.0
|
||||
show_percentage = false
|
||||
|
||||
[node name="PasswordHint" type="Label" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
theme_override_font_sizes/font_size = 11
|
||||
text = "Min 8 characters, include number and symbol"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="RegisterButton" type="Button" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 48)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 45)
|
||||
text = "Create Account"
|
||||
|
||||
[node name="BackToLoginLink" type="LinkButton" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Already have an account? Sign In"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="RegStatusLabel" type="Label" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
@@ -226,11 +233,13 @@ anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -100.0
|
||||
offset_top = -25.0
|
||||
offset_right = -10.0
|
||||
offset_bottom = -10.0
|
||||
theme_override_colors/font_color = Color(0.3, 0.3, 0.4, 1)
|
||||
offset_left = -120.0
|
||||
offset_top = -40.0
|
||||
offset_right = -16.0
|
||||
offset_bottom = -16.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 0.6)
|
||||
theme_override_font_sizes/font_size = 11
|
||||
text = "v1.0.0"
|
||||
horizontal_alignment = 2
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://profile_panel"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dyx0upokhsh2e"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/ui/profile_panel.gd" id="1"]
|
||||
[ext_resource type="Script" uid="uid://y6wswtalyiho" path="res://scripts/ui/profile_panel.gd" id="1"]
|
||||
[ext_resource type="Theme" uid="uid://da337sh5qxi0s" path="res://assets/themes/ui_theme.tres" id="2"]
|
||||
|
||||
[node name="ProfilePanel" type="PanelContainer"]
|
||||
anchors_preset = 0
|
||||
offset_right = 350.0
|
||||
offset_bottom = 400.0
|
||||
offset_right = 380.0
|
||||
offset_bottom = 480.0
|
||||
theme = ExtResource("2")
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="VBox" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 12
|
||||
theme_override_constants/separation = 14
|
||||
|
||||
[node name="Header" type="HBoxContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
@@ -18,55 +19,61 @@ layout_mode = 2
|
||||
[node name="Title" type="Label" parent="VBox/Header"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_colors/font_color = Color(0, 0.831, 1, 1)
|
||||
theme_override_font_sizes/font_size = 20
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 22
|
||||
text = "Profile"
|
||||
|
||||
[node name="CloseButton" type="Button" parent="VBox/Header"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(36, 36)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(30, 30)
|
||||
text = "✕"
|
||||
|
||||
[node name="AvatarSection" type="HBoxContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 16
|
||||
alignment = 1
|
||||
|
||||
[node name="AvatarDisplay" type="TextureRect" parent="VBox/AvatarSection"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(88, 88)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(80, 80)
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="AvatarButtons" type="VBoxContainer" parent="VBox/AvatarSection"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="ChangeAvatarBtn" type="Button" parent="VBox/AvatarSection/AvatarButtons"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
text = "Change Avatar"
|
||||
|
||||
[node name="DisplayNameSection" type="VBoxContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="Label" type="Label" parent="VBox/DisplayNameSection"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
text = "Display Name"
|
||||
|
||||
[node name="HBox" type="HBoxContainer" parent="VBox/DisplayNameSection"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="DisplayNameInput" type="LineEdit" parent="VBox/DisplayNameSection/HBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
custom_minimum_size = Vector2(0, 35)
|
||||
max_length = 50
|
||||
|
||||
[node name="SaveNameBtn" type="Button" parent="VBox/DisplayNameSection/HBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(80, 44)
|
||||
layout_mode = 2
|
||||
text = "Save"
|
||||
|
||||
@@ -75,10 +82,12 @@ layout_mode = 2
|
||||
|
||||
[node name="StatsSection" type="VBoxContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 6
|
||||
|
||||
[node name="StatsTitle" type="Label" parent="VBox/StatsSection"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0, 0.831, 1, 1)
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "Statistics"
|
||||
|
||||
[node name="GamesPlayed" type="Label" parent="VBox/StatsSection"]
|
||||
@@ -101,20 +110,23 @@ layout_mode = 2
|
||||
|
||||
[node name="AccountSection" type="VBoxContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="AccountType" type="Label" parent="VBox/AccountSection"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
text = "Account: Guest"
|
||||
|
||||
[node name="LinkAccountBtn" type="Button" parent="VBox/AccountSection"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
text = "Link Email (Keep Progress)"
|
||||
|
||||
[node name="LogoutBtn" type="Button" parent="VBox/AccountSection"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
text = "Logout"
|
||||
|
||||
@@ -127,12 +139,12 @@ horizontal_alignment = 1
|
||||
[node name="AvatarSelectionPopup" type="PopupPanel" parent="."]
|
||||
unique_name_in_owner = true
|
||||
title = "Select Avatar"
|
||||
size = Vector2i(300, 200)
|
||||
size = Vector2i(320, 220)
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="AvatarSelectionPopup"]
|
||||
unique_name_in_owner = true
|
||||
offset_left = 10.0
|
||||
offset_top = 10.0
|
||||
offset_right = 290.0
|
||||
offset_bottom = 190.0
|
||||
offset_left = 4.0
|
||||
offset_top = 4.0
|
||||
offset_right = 316.0
|
||||
offset_bottom = 216.0
|
||||
columns = 3
|
||||
|
||||
@@ -10,7 +10,7 @@ signal session_restored
|
||||
signal logged_out
|
||||
|
||||
# Auth modes
|
||||
enum AuthMode { GUEST, EMAIL, GOOGLE, APPLE, FACEBOOK, CUSTOM }
|
||||
enum AuthMode {GUEST, EMAIL, GOOGLE, APPLE, FACEBOOK, CUSTOM}
|
||||
|
||||
# User data
|
||||
var current_user: Dictionary = {}
|
||||
@@ -43,7 +43,7 @@ func _try_restore_session() -> void:
|
||||
print("[AuthManager] Could not open session file")
|
||||
return
|
||||
|
||||
var session_data := file.get_var()
|
||||
var session_data = file.get_var()
|
||||
file.close()
|
||||
|
||||
if not session_data or not session_data is Dictionary:
|
||||
@@ -59,7 +59,7 @@ func _try_restore_session() -> void:
|
||||
print("[AuthManager] Attempting to restore session...")
|
||||
|
||||
# Try to restore the session
|
||||
var session := NakamaClient.restore_session(token)
|
||||
var session = NakamaClient.restore_session(token)
|
||||
|
||||
if session.is_expired():
|
||||
# Try to refresh
|
||||
@@ -379,7 +379,7 @@ func _connect_socket() -> bool:
|
||||
return true
|
||||
|
||||
NakamaManager.socket = Nakama.create_socket_from(NakamaManager.client)
|
||||
var result := await NakamaManager.socket.connect_async(NakamaManager.session)
|
||||
var result = await NakamaManager.socket.connect_async(NakamaManager.session)
|
||||
|
||||
if result.is_exception():
|
||||
push_error("[AuthManager] Socket connection failed: " + result.get_exception().message)
|
||||
@@ -397,7 +397,7 @@ func _load_user_profile() -> void:
|
||||
if not NakamaManager.session:
|
||||
return
|
||||
|
||||
var account := await NakamaManager.client.get_account_async(NakamaManager.session)
|
||||
var account = await NakamaManager.client.get_account_async(NakamaManager.session)
|
||||
|
||||
if account.is_exception():
|
||||
push_error("[AuthManager] Failed to load account")
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
uid://b3huvqm8j7boj
|
||||
@@ -0,0 +1 @@
|
||||
uid://8wb6177udj3o
|
||||
@@ -49,7 +49,7 @@ func load_profile() -> Dictionary:
|
||||
return {}
|
||||
|
||||
# First get basic account info
|
||||
var account := await NakamaManager.client.get_account_async(NakamaManager.session)
|
||||
var account = await NakamaManager.client.get_account_async(NakamaManager.session)
|
||||
|
||||
if account.is_exception():
|
||||
push_error("[UserProfileManager] Failed to load account")
|
||||
@@ -70,7 +70,7 @@ func load_profile() -> Dictionary:
|
||||
}
|
||||
|
||||
# Load custom profile data from storage
|
||||
var storage_result := await NakamaManager.client.read_storage_objects_async(
|
||||
var storage_result = await NakamaManager.client.read_storage_objects_async(
|
||||
NakamaManager.session,
|
||||
[NakamaStorageObjectId.new(PROFILE_COLLECTION, "profile", account.user.id)]
|
||||
)
|
||||
@@ -93,7 +93,7 @@ func load_stats() -> Dictionary:
|
||||
|
||||
var user_id := NakamaManager.session.user_id
|
||||
|
||||
var storage_result := await NakamaManager.client.read_storage_objects_async(
|
||||
var storage_result = await NakamaManager.client.read_storage_objects_async(
|
||||
NakamaManager.session,
|
||||
[NakamaStorageObjectId.new(STATS_COLLECTION, "game_stats", user_id)]
|
||||
)
|
||||
@@ -134,8 +134,8 @@ func update_display_name(new_name: String) -> bool:
|
||||
|
||||
var result := await NakamaManager.client.update_account_async(
|
||||
NakamaManager.session,
|
||||
null, # username (don't change)
|
||||
new_name # display_name
|
||||
null, # username (don't change)
|
||||
new_name # display_name
|
||||
)
|
||||
|
||||
if result.is_exception():
|
||||
@@ -188,13 +188,13 @@ func _save_profile_data() -> bool:
|
||||
var write_obj := NakamaWriteStorageObject.new(
|
||||
PROFILE_COLLECTION,
|
||||
"profile",
|
||||
2, # Public read
|
||||
1, # Owner write
|
||||
2, # Public read
|
||||
1, # Owner write
|
||||
JSON.stringify(custom_data),
|
||||
"" # Version (empty = overwrite)
|
||||
"" # Version (empty = overwrite)
|
||||
)
|
||||
|
||||
var result := await NakamaManager.client.write_storage_objects_async(
|
||||
var result = await NakamaManager.client.write_storage_objects_async(
|
||||
NakamaManager.session,
|
||||
[write_obj]
|
||||
)
|
||||
@@ -219,13 +219,13 @@ func update_stats(new_stats: Dictionary) -> bool:
|
||||
var write_obj := NakamaWriteStorageObject.new(
|
||||
STATS_COLLECTION,
|
||||
"game_stats",
|
||||
2, # Public read
|
||||
1, # Owner write
|
||||
2, # Public read
|
||||
1, # Owner write
|
||||
JSON.stringify(stats),
|
||||
""
|
||||
)
|
||||
|
||||
var result := await NakamaManager.client.write_storage_objects_async(
|
||||
var result = await NakamaManager.client.write_storage_objects_async(
|
||||
NakamaManager.session,
|
||||
[write_obj]
|
||||
)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
uid://w0d8hfhm6yek
|
||||
@@ -0,0 +1 @@
|
||||
uid://ic8fg0o0p0i4
|
||||
@@ -0,0 +1 @@
|
||||
uid://vgyrq5y5p7jw
|
||||
@@ -283,6 +283,10 @@ func _on_auth_started() -> void:
|
||||
reg_status_label.text = ""
|
||||
|
||||
func _on_auth_completed(success: bool, _user_data: Dictionary) -> void:
|
||||
# Check if node is still in tree (may have been freed during scene transition)
|
||||
if not is_inside_tree():
|
||||
return
|
||||
|
||||
is_loading = false
|
||||
loading_spinner.visible = false
|
||||
_set_inputs_enabled(true)
|
||||
@@ -301,6 +305,8 @@ func _on_auth_failed(error: String) -> void:
|
||||
_show_error(error)
|
||||
|
||||
func _on_session_restored() -> void:
|
||||
if not is_inside_tree():
|
||||
return
|
||||
_go_to_lobby()
|
||||
|
||||
# =============================================================================
|
||||
@@ -336,5 +342,13 @@ func _is_valid_email(email: String) -> bool:
|
||||
return regex.search(email) != null
|
||||
|
||||
func _go_to_lobby() -> void:
|
||||
# Navigate to lobby scene
|
||||
get_tree().change_scene_to_file("res://assets/models/meshes/lobby.tscn")
|
||||
# Navigate to lobby scene - use deferred call to avoid issues during signal callbacks
|
||||
if get_tree():
|
||||
get_tree().change_scene_to_file("res://scenes/lobby.tscn")
|
||||
else:
|
||||
# Fallback: try deferred call
|
||||
call_deferred("_deferred_go_to_lobby")
|
||||
|
||||
func _deferred_go_to_lobby() -> void:
|
||||
if get_tree():
|
||||
get_tree().change_scene_to_file("res://scenes/lobby.tscn")
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
uid://b1lcy1ikdkknq
|
||||
@@ -0,0 +1 @@
|
||||
uid://y6wswtalyiho
|
||||
Reference in New Issue
Block a user