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"]
|
[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"]
|
||||||
[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
|
|
||||||
|
|
||||||
[node name="Lobby" type="Control"]
|
[node name="Lobby" type="Control"]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
@@ -89,6 +10,7 @@ anchor_right = 1.0
|
|||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
theme = ExtResource("2_theme")
|
||||||
script = ExtResource("1_lp6xi")
|
script = ExtResource("1_lp6xi")
|
||||||
|
|
||||||
[node name="Background" type="ColorRect" parent="."]
|
[node name="Background" type="ColorRect" parent="."]
|
||||||
@@ -98,17 +20,7 @@ anchor_right = 1.0
|
|||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
color = Color(0.06, 0.06, 0.08, 1)
|
color = Color(0.12, 0.1, 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)
|
|
||||||
|
|
||||||
[node name="MainMenuPanel" type="PanelContainer" parent="."]
|
[node name="MainMenuPanel" type="PanelContainer" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
@@ -118,16 +30,15 @@ anchor_top = 0.5
|
|||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
offset_left = -220.0
|
offset_left = -220.0
|
||||||
offset_top = -220.0
|
offset_top = -240.0
|
||||||
offset_right = 220.0
|
offset_right = 220.0
|
||||||
offset_bottom = 220.0
|
offset_bottom = 240.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme_override_styles/panel = SubResource("StyleBoxFlat_panel")
|
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="MainMenuPanel"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="MainMenuPanel"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/separation = 16
|
theme_override_constants/separation = 18
|
||||||
|
|
||||||
[node name="TitleContainer" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer"]
|
[node name="TitleContainer" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -135,69 +46,52 @@ theme_override_constants/separation = 4
|
|||||||
|
|
||||||
[node name="Title" type="Label" parent="MainMenuPanel/VBoxContainer/TitleContainer"]
|
[node name="Title" type="Label" parent="MainMenuPanel/VBoxContainer/TitleContainer"]
|
||||||
layout_mode = 2
|
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 = 42
|
theme_override_font_sizes/font_size = 44
|
||||||
text = "TEKTON DASH"
|
text = "TEKTON DASH"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="Subtitle" type="Label" parent="MainMenuPanel/VBoxContainer/TitleContainer"]
|
[node name="Subtitle" type="Label" parent="MainMenuPanel/VBoxContainer/TitleContainer"]
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 12
|
||||||
text = "ARMAGEDDON VERSION"
|
text = "ARMAGEDDON VERSION"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="Separator" type="HSeparator" parent="MainMenuPanel/VBoxContainer"]
|
[node name="Separator" type="HSeparator" parent="MainMenuPanel/VBoxContainer"]
|
||||||
modulate = Color(0.9, 0.45, 0.1, 0.5)
|
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="InputSection" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer"]
|
[node name="InputSection" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/separation = 8
|
theme_override_constants/separation = 10
|
||||||
|
|
||||||
[node name="PlayerNameLabel" type="Label" parent="MainMenuPanel/VBoxContainer/InputSection"]
|
[node name="PlayerNameLabel" type="Label" parent="MainMenuPanel/VBoxContainer/InputSection"]
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 13
|
||||||
text = "YOUR NAME"
|
text = "YOUR NAME"
|
||||||
|
|
||||||
[node name="PlayerNameInput" type="LineEdit" parent="MainMenuPanel/VBoxContainer/InputSection"]
|
[node name="PlayerNameInput" type="LineEdit" parent="MainMenuPanel/VBoxContainer/InputSection"]
|
||||||
custom_minimum_size = Vector2(0, 36)
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
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"
|
text = "Player"
|
||||||
placeholder_text = "Enter your name..."
|
placeholder_text = "Enter your name..."
|
||||||
|
|
||||||
[node name="ButtonSection" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer"]
|
[node name="ButtonSection" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/separation = 10
|
theme_override_constants/separation = 12
|
||||||
|
|
||||||
[node name="CreateRoomBtn" type="Button" parent="MainMenuPanel/VBoxContainer/ButtonSection"]
|
[node name="CreateRoomBtn" type="Button" parent="MainMenuPanel/VBoxContainer/ButtonSection"]
|
||||||
custom_minimum_size = Vector2(0, 44)
|
custom_minimum_size = Vector2(0, 48)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_colors/font_hover_color = Color(0.1, 0.1, 0.12, 1)
|
theme_override_font_sizes/font_size = 16
|
||||||
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")
|
|
||||||
text = "CREATE ROOM"
|
text = "CREATE ROOM"
|
||||||
|
|
||||||
[node name="BrowseRoomsBtn" type="Button" parent="MainMenuPanel/VBoxContainer/ButtonSection"]
|
[node name="BrowseRoomsBtn" type="Button" parent="MainMenuPanel/VBoxContainer/ButtonSection"]
|
||||||
custom_minimum_size = Vector2(0, 44)
|
custom_minimum_size = Vector2(0, 48)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_colors/font_hover_color = Color(0.1, 0.1, 0.12, 1)
|
theme_override_font_sizes/font_size = 16
|
||||||
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")
|
|
||||||
text = "BROWSE ROOMS"
|
text = "BROWSE ROOMS"
|
||||||
|
|
||||||
[node name="RoomListPanel" type="PanelContainer" parent="."]
|
[node name="RoomListPanel" type="PanelContainer" parent="."]
|
||||||
@@ -208,94 +102,67 @@ anchor_left = 0.5
|
|||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
offset_left = -280.0
|
offset_left = -300.0
|
||||||
offset_top = -240.0
|
offset_top = -260.0
|
||||||
offset_right = 280.0
|
offset_right = 300.0
|
||||||
offset_bottom = 240.0
|
offset_bottom = 260.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme_override_styles/panel = SubResource("StyleBoxFlat_panel")
|
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="RoomListPanel"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="RoomListPanel"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/separation = 12
|
theme_override_constants/separation = 14
|
||||||
|
|
||||||
[node name="Header" type="Label" parent="RoomListPanel/VBoxContainer"]
|
[node name="Header" type="Label" parent="RoomListPanel/VBoxContainer"]
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 28
|
||||||
text = "SERVER BROWSER"
|
text = "SERVER BROWSER"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="HSeparator" type="HSeparator" parent="RoomListPanel/VBoxContainer"]
|
[node name="HSeparator" type="HSeparator" parent="RoomListPanel/VBoxContainer"]
|
||||||
modulate = Color(0.9, 0.45, 0.1, 0.5)
|
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="MatchIdLabel" type="Label" parent="RoomListPanel/VBoxContainer"]
|
[node name="MatchIdLabel" type="Label" parent="RoomListPanel/VBoxContainer"]
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 12
|
||||||
text = "DIRECT CONNECT (MATCH ID)"
|
text = "DIRECT CONNECT (MATCH ID)"
|
||||||
|
|
||||||
[node name="MatchIdInput" type="LineEdit" parent="RoomListPanel/VBoxContainer"]
|
[node name="MatchIdInput" type="LineEdit" parent="RoomListPanel/VBoxContainer"]
|
||||||
custom_minimum_size = Vector2(0, 36)
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
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..."
|
placeholder_text = "Paste match ID here..."
|
||||||
|
|
||||||
[node name="RoomListLabel" type="Label" parent="RoomListPanel/VBoxContainer"]
|
[node name="RoomListLabel" type="Label" parent="RoomListPanel/VBoxContainer"]
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 12
|
||||||
text = "AVAILABLE SERVERS"
|
text = "AVAILABLE SERVERS"
|
||||||
|
|
||||||
[node name="RoomList" type="ItemList" parent="RoomListPanel/VBoxContainer"]
|
[node name="RoomList" type="ItemList" parent="RoomListPanel/VBoxContainer"]
|
||||||
custom_minimum_size = Vector2(0, 180)
|
custom_minimum_size = Vector2(0, 200)
|
||||||
layout_mode = 2
|
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
|
allow_reselect = true
|
||||||
|
|
||||||
[node name="ButtonContainer" type="HBoxContainer" parent="RoomListPanel/VBoxContainer"]
|
[node name="ButtonContainer" type="HBoxContainer" parent="RoomListPanel/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/separation = 12
|
theme_override_constants/separation = 14
|
||||||
alignment = 1
|
alignment = 1
|
||||||
|
|
||||||
[node name="RefreshBtn" type="Button" parent="RoomListPanel/VBoxContainer/ButtonContainer"]
|
[node name="RefreshBtn" type="Button" parent="RoomListPanel/VBoxContainer/ButtonContainer"]
|
||||||
custom_minimum_size = Vector2(100, 40)
|
custom_minimum_size = Vector2(110, 44)
|
||||||
layout_mode = 2
|
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"
|
text = "REFRESH"
|
||||||
|
|
||||||
[node name="JoinBtn" type="Button" parent="RoomListPanel/VBoxContainer/ButtonContainer"]
|
[node name="JoinBtn" type="Button" parent="RoomListPanel/VBoxContainer/ButtonContainer"]
|
||||||
custom_minimum_size = Vector2(120, 40)
|
custom_minimum_size = Vector2(130, 44)
|
||||||
layout_mode = 2
|
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"
|
text = "JOIN SERVER"
|
||||||
|
|
||||||
[node name="BackBtn" type="Button" parent="RoomListPanel/VBoxContainer/ButtonContainer"]
|
[node name="BackBtn" type="Button" parent="RoomListPanel/VBoxContainer/ButtonContainer"]
|
||||||
custom_minimum_size = Vector2(100, 40)
|
custom_minimum_size = Vector2(110, 44)
|
||||||
layout_mode = 2
|
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"
|
text = "BACK"
|
||||||
|
|
||||||
[node name="LobbyPanel" type="PanelContainer" parent="."]
|
[node name="LobbyPanel" type="PanelContainer" parent="."]
|
||||||
@@ -306,21 +173,20 @@ anchor_left = 0.5
|
|||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
offset_left = -280.0
|
offset_left = -300.0
|
||||||
offset_top = -240.0
|
offset_top = -260.0
|
||||||
offset_right = 280.0
|
offset_right = 300.0
|
||||||
offset_bottom = 240.0
|
offset_bottom = 260.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme_override_styles/panel = SubResource("StyleBoxFlat_panel")
|
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="LobbyPanel"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="LobbyPanel"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/separation = 12
|
theme_override_constants/separation = 14
|
||||||
|
|
||||||
[node name="RoomNameHeader" type="Label" parent="LobbyPanel/VBoxContainer"]
|
[node name="RoomNameHeader" type="Label" parent="LobbyPanel/VBoxContainer"]
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 26
|
||||||
text = "ROOM: "
|
text = "ROOM: "
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
@@ -331,84 +197,57 @@ alignment = 1
|
|||||||
|
|
||||||
[node name="MatchIdDisplay" type="Label" parent="LobbyPanel/VBoxContainer/MatchIdContainer"]
|
[node name="MatchIdDisplay" type="Label" parent="LobbyPanel/VBoxContainer/MatchIdContainer"]
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 10
|
||||||
text = "Match ID: "
|
text = "Match ID: "
|
||||||
|
|
||||||
[node name="CopyIdBtn" type="Button" parent="LobbyPanel/VBoxContainer/MatchIdContainer"]
|
[node name="CopyIdBtn" type="Button" parent="LobbyPanel/VBoxContainer/MatchIdContainer"]
|
||||||
custom_minimum_size = Vector2(70, 24)
|
custom_minimum_size = Vector2(80, 32)
|
||||||
layout_mode = 2
|
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_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"
|
text = "COPY"
|
||||||
|
|
||||||
[node name="HSeparator" type="HSeparator" parent="LobbyPanel/VBoxContainer"]
|
[node name="HSeparator" type="HSeparator" parent="LobbyPanel/VBoxContainer"]
|
||||||
modulate = Color(0.9, 0.45, 0.1, 0.5)
|
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="PlayersLabel" type="Label" parent="LobbyPanel/VBoxContainer"]
|
[node name="PlayersLabel" type="Label" parent="LobbyPanel/VBoxContainer"]
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 13
|
||||||
text = "PLAYERS"
|
text = "PLAYERS"
|
||||||
|
|
||||||
[node name="PlayerList" type="ItemList" parent="LobbyPanel/VBoxContainer"]
|
[node name="PlayerList" type="ItemList" parent="LobbyPanel/VBoxContainer"]
|
||||||
custom_minimum_size = Vector2(0, 140)
|
custom_minimum_size = Vector2(0, 160)
|
||||||
layout_mode = 2
|
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
|
allow_reselect = true
|
||||||
|
|
||||||
[node name="StatusLabel" type="Label" parent="LobbyPanel/VBoxContainer"]
|
[node name="StatusLabel" type="Label" parent="LobbyPanel/VBoxContainer"]
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 14
|
||||||
text = "Waiting for players..."
|
text = "Waiting for players..."
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="ButtonContainer" type="HBoxContainer" parent="LobbyPanel/VBoxContainer"]
|
[node name="ButtonContainer" type="HBoxContainer" parent="LobbyPanel/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/separation = 12
|
theme_override_constants/separation = 14
|
||||||
alignment = 1
|
alignment = 1
|
||||||
|
|
||||||
[node name="ReadyBtn" type="Button" parent="LobbyPanel/VBoxContainer/ButtonContainer"]
|
[node name="ReadyBtn" type="Button" parent="LobbyPanel/VBoxContainer/ButtonContainer"]
|
||||||
custom_minimum_size = Vector2(100, 44)
|
custom_minimum_size = Vector2(110, 48)
|
||||||
layout_mode = 2
|
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
|
toggle_mode = true
|
||||||
text = "READY"
|
text = "READY"
|
||||||
|
|
||||||
[node name="StartGameBtn" type="Button" parent="LobbyPanel/VBoxContainer/ButtonContainer"]
|
[node name="StartGameBtn" type="Button" parent="LobbyPanel/VBoxContainer/ButtonContainer"]
|
||||||
custom_minimum_size = Vector2(130, 44)
|
custom_minimum_size = Vector2(140, 48)
|
||||||
layout_mode = 2
|
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
|
disabled = true
|
||||||
text = "START GAME"
|
text = "START GAME"
|
||||||
|
|
||||||
[node name="LeaveBtn" type="Button" parent="LobbyPanel/VBoxContainer/ButtonContainer"]
|
[node name="LeaveBtn" type="Button" parent="LobbyPanel/VBoxContainer/ButtonContainer"]
|
||||||
custom_minimum_size = Vector2(100, 44)
|
custom_minimum_size = Vector2(110, 48)
|
||||||
layout_mode = 2
|
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"
|
text = "LEAVE"
|
||||||
|
|
||||||
[node name="StatusBar" type="PanelContainer" parent="."]
|
[node name="StatusBar" type="PanelContainer" parent="."]
|
||||||
@@ -417,17 +256,16 @@ anchors_preset = 12
|
|||||||
anchor_top = 1.0
|
anchor_top = 1.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
offset_left = 39.0
|
offset_left = 24.0
|
||||||
offset_top = -83.0
|
offset_top = -72.0
|
||||||
offset_right = -39.0
|
offset_right = -24.0
|
||||||
offset_bottom = -26.0
|
offset_bottom = -24.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 0
|
grow_vertical = 0
|
||||||
theme_override_styles/panel = SubResource("StyleBoxFlat_panel")
|
|
||||||
|
|
||||||
[node name="ConnectionStatus" type="Label" parent="StatusBar"]
|
[node name="ConnectionStatus" type="Label" parent="StatusBar"]
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 12
|
||||||
text = "NOT CONNECTED"
|
text = "NOT CONNECTED"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
@@ -437,12 +275,12 @@ layout_mode = 1
|
|||||||
anchors_preset = 1
|
anchors_preset = 1
|
||||||
anchor_left = 1.0
|
anchor_left = 1.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
offset_left = -126.0
|
offset_left = -130.0
|
||||||
offset_top = 19.0
|
offset_top = 20.0
|
||||||
offset_right = -18.0
|
offset_right = -20.0
|
||||||
offset_bottom = 37.0
|
offset_bottom = 40.0
|
||||||
grow_horizontal = 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
|
theme_override_font_sizes/font_size = 11
|
||||||
text = "v0.1.0 ALPHA"
|
text = "v0.1.0 ALPHA"
|
||||||
horizontal_alignment = 2
|
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" uid="uid://cvstgaigwt0sj" path="res://scripts/launcher_main.gd" id="1"]
|
||||||
[ext_resource type="Script" path="res://scripts/version_checker.gd" id="2"]
|
[ext_resource type="Script" uid="uid://ptdurqksg1sv" path="res://scripts/version_checker.gd" id="2"]
|
||||||
[ext_resource type="Script" path="res://scripts/download_manager.gd" id="3"]
|
[ext_resource type="Script" uid="uid://cer12vb230kfw" path="res://scripts/download_manager.gd" id="3"]
|
||||||
[ext_resource type="Script" path="res://scripts/update_applier.gd" id="4"]
|
[ext_resource type="Script" uid="uid://n2ptlbblexo6" path="res://scripts/update_applier.gd" id="4"]
|
||||||
[ext_resource type="Script" path="res://scripts/news_fetcher.gd" id="5"]
|
[ext_resource type="Script" uid="uid://coer7l074xm6x" 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
|
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_titlebar"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_titlebar"]
|
||||||
bg_color = Color(0.059, 0.059, 0.118, 1)
|
bg_color = Color(0.059, 0.059, 0.118, 1)
|
||||||
corner_radius_top_left = 12
|
corner_radius_top_left = 12
|
||||||
corner_radius_top_right = 12
|
corner_radius_top_right = 12
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_button"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tab_panel"]
|
||||||
bg_color = Color(0, 0.831, 1, 1)
|
content_margin_left = 8.0
|
||||||
corner_radius_top_left = 8
|
content_margin_top = 8.0
|
||||||
corner_radius_top_right = 8
|
content_margin_right = 8.0
|
||||||
corner_radius_bottom_right = 8
|
content_margin_bottom = 8.0
|
||||||
corner_radius_bottom_left = 8
|
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_right = 8
|
||||||
corner_radius_bottom_left = 8
|
corner_radius_bottom_left = 8
|
||||||
|
|
||||||
@@ -49,14 +34,19 @@ corner_radius_top_right = 4
|
|||||||
corner_radius_bottom_right = 4
|
corner_radius_bottom_right = 4
|
||||||
corner_radius_bottom_left = 4
|
corner_radius_bottom_left = 4
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tab_panel"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_button_hover"]
|
||||||
bg_color = Color(0.059, 0.059, 0.118, 1)
|
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_right = 8
|
||||||
corner_radius_bottom_left = 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"]
|
[node name="Launcher" type="Control"]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
@@ -65,7 +55,6 @@ anchor_right = 1.0
|
|||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme_override_styles/panel = SubResource("StyleBoxFlat_bg")
|
|
||||||
script = ExtResource("1")
|
script = ExtResource("1")
|
||||||
|
|
||||||
[node name="Background" type="ColorRect" parent="."]
|
[node name="Background" type="ColorRect" parent="."]
|
||||||
@@ -73,6 +62,8 @@ layout_mode = 1
|
|||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
color = Color(0.039, 0.039, 0.102, 1)
|
color = Color(0.039, 0.039, 0.102, 1)
|
||||||
|
|
||||||
[node name="VersionChecker" type="Node" parent="."]
|
[node name="VersionChecker" type="Node" parent="."]
|
||||||
@@ -87,7 +78,7 @@ script = ExtResource("4")
|
|||||||
[node name="NewsFetcher" type="Node" parent="."]
|
[node name="NewsFetcher" type="Node" parent="."]
|
||||||
script = ExtResource("5")
|
script = ExtResource("5")
|
||||||
|
|
||||||
[node name="MainPanel" type="PanelContainer" parent="."]
|
[node name="MainPanel" type="VBoxContainer" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
@@ -96,39 +87,35 @@ offset_left = 20.0
|
|||||||
offset_top = 20.0
|
offset_top = 20.0
|
||||||
offset_right = -20.0
|
offset_right = -20.0
|
||||||
offset_bottom = -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"]
|
[node name="TitleBar" type="PanelContainer" parent="MainPanel"]
|
||||||
|
custom_minimum_size = Vector2(0, 60)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 0
|
size_flags_vertical = 0
|
||||||
custom_minimum_size = Vector2(0, 60)
|
|
||||||
theme_override_styles/panel = SubResource("StyleBoxFlat_titlebar")
|
theme_override_styles/panel = SubResource("StyleBoxFlat_titlebar")
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="MainPanel/TitleBar"]
|
[node name="HBoxContainer" type="HBoxContainer" parent="MainPanel/TitleBar"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
offset_left = 16.0
|
|
||||||
offset_right = -16.0
|
|
||||||
|
|
||||||
[node name="TitleLabel" type="Label" parent="MainPanel/TitleBar/HBoxContainer"]
|
[node name="TitleLabel" type="Label" parent="MainPanel/TitleBar/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
text = "TEKTON LAUNCHER"
|
|
||||||
theme_override_colors/font_color = Color(0, 0.831, 1, 1)
|
theme_override_colors/font_color = Color(0, 0.831, 1, 1)
|
||||||
theme_override_font_sizes/font_size = 24
|
theme_override_font_sizes/font_size = 24
|
||||||
|
text = "TEKTON LAUNCHER"
|
||||||
|
|
||||||
[node name="VersionLabel" type="Label" parent="MainPanel/TitleBar"]
|
[node name="VersionLabel" type="Label" parent="MainPanel/TitleBar"]
|
||||||
layout_mode = 2
|
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)
|
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
||||||
|
text = "v0.0.0"
|
||||||
horizontal_alignment = 2
|
horizontal_alignment = 2
|
||||||
|
|
||||||
[node name="ContentContainer" type="VBoxContainer" parent="MainPanel"]
|
[node name="ContentContainer" type="VBoxContainer" parent="MainPanel"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
offset_top = 60.0
|
size_flags_vertical = 3
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
[node name="TabContainer" type="TabContainer" parent="MainPanel/ContentContainer"]
|
[node name="TabContainer" type="TabContainer" parent="MainPanel/ContentContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -145,6 +132,8 @@ layout_mode = 1
|
|||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
[node name="NewsVBox" type="VBoxContainer" parent="MainPanel/ContentContainer/TabContainer/News/ScrollContainer"]
|
[node name="NewsVBox" type="VBoxContainer" parent="MainPanel/ContentContainer/TabContainer/News/ScrollContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -161,6 +150,8 @@ layout_mode = 1
|
|||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
[node name="ChangelogVBox" type="VBoxContainer" parent="MainPanel/ContentContainer/TabContainer/Changelog/ScrollContainer"]
|
[node name="ChangelogVBox" type="VBoxContainer" parent="MainPanel/ContentContainer/TabContainer/Changelog/ScrollContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -168,39 +159,39 @@ size_flags_horizontal = 3
|
|||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
|
||||||
[node name="BottomBar" type="HBoxContainer" parent="MainPanel/ContentContainer"]
|
[node name="BottomBar" type="HBoxContainer" parent="MainPanel/ContentContainer"]
|
||||||
layout_mode = 2
|
|
||||||
custom_minimum_size = Vector2(0, 80)
|
custom_minimum_size = Vector2(0, 80)
|
||||||
|
layout_mode = 2
|
||||||
alignment = 2
|
alignment = 2
|
||||||
|
|
||||||
[node name="StatusLabel" type="Label" parent="MainPanel/ContentContainer/BottomBar"]
|
[node name="StatusLabel" type="Label" parent="MainPanel/ContentContainer/BottomBar"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
text = "Checking for updates..."
|
|
||||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
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"]
|
[node name="ProgressContainer" type="VBoxContainer" parent="MainPanel/ContentContainer/BottomBar"]
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 2
|
|
||||||
custom_minimum_size = Vector2(200, 0)
|
custom_minimum_size = Vector2(200, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="ProgressBar" type="ProgressBar" parent="MainPanel/ContentContainer/BottomBar/ProgressContainer"]
|
[node name="ProgressBar" type="ProgressBar" parent="MainPanel/ContentContainer/BottomBar/ProgressContainer"]
|
||||||
layout_mode = 2
|
|
||||||
custom_minimum_size = Vector2(200, 20)
|
custom_minimum_size = Vector2(200, 20)
|
||||||
|
layout_mode = 2
|
||||||
theme_override_styles/background = SubResource("StyleBoxFlat_progress_bg")
|
theme_override_styles/background = SubResource("StyleBoxFlat_progress_bg")
|
||||||
theme_override_styles/fill = SubResource("StyleBoxFlat_progress_fill")
|
theme_override_styles/fill = SubResource("StyleBoxFlat_progress_fill")
|
||||||
show_percentage = false
|
show_percentage = false
|
||||||
|
|
||||||
[node name="ProgressLabel" type="Label" parent="MainPanel/ContentContainer/BottomBar/ProgressContainer"]
|
[node name="ProgressLabel" type="Label" parent="MainPanel/ContentContainer/BottomBar/ProgressContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "0%"
|
|
||||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
||||||
|
text = "0%"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="PlayButton" type="Button" parent="MainPanel/ContentContainer/BottomBar"]
|
[node name="PlayButton" type="Button" parent="MainPanel/ContentContainer/BottomBar"]
|
||||||
layout_mode = 2
|
|
||||||
custom_minimum_size = Vector2(160, 50)
|
custom_minimum_size = Vector2(160, 50)
|
||||||
|
layout_mode = 2
|
||||||
theme_override_colors/font_color = Color(0.039, 0.039, 0.102, 1)
|
theme_override_colors/font_color = Color(0.039, 0.039, 0.102, 1)
|
||||||
theme_override_font_sizes/font_size = 18
|
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/hover = SubResource("StyleBoxFlat_button_hover")
|
||||||
|
theme_override_styles/normal = SubResource("StyleBoxFlat_button")
|
||||||
text = "► PLAY"
|
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 update_failed(error: String)
|
||||||
signal rollback_completed
|
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:
|
func apply_update(downloaded_pck_path: String, version: String) -> void:
|
||||||
emit_signal("update_started")
|
emit_signal("update_started")
|
||||||
@@ -91,7 +91,7 @@ func _copy_file(from: String, to: String) -> bool:
|
|||||||
return false
|
return false
|
||||||
|
|
||||||
# Copy in chunks for large files
|
# 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():
|
while source.get_position() < source.get_length():
|
||||||
var chunk := source.get_buffer(CHUNK_SIZE)
|
var chunk := source.get_buffer(CHUNK_SIZE)
|
||||||
dest.store_buffer(chunk)
|
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
|
# Remove oldest backups if we have too many
|
||||||
while backups.size() > keep_count:
|
while backups.size() > keep_count:
|
||||||
var old_backup := backups.pop_front()
|
var old_backup = backups.pop_front()
|
||||||
dir.remove(old_backup)
|
dir.remove(old_backup)
|
||||||
print("[UpdateApplier] Removed old backup: ", old_backup)
|
print("[UpdateApplier] Removed old backup: ", old_backup)
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ func rollback_to_backup() -> bool:
|
|||||||
return false
|
return false
|
||||||
|
|
||||||
backups.sort()
|
backups.sort()
|
||||||
var latest_backup := backups.back()
|
var latest_backup = backups.back()
|
||||||
|
|
||||||
# Restore the backup
|
# Restore the backup
|
||||||
if _copy_file(backup_dir + latest_backup, game_dir + pck_name):
|
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]
|
[application]
|
||||||
|
|
||||||
config/name="tekton-local"
|
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/features=PackedStringArray("4.4", "Forward Plus")
|
||||||
config/icon="res://icon.svg"
|
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"]
|
[node name="BootScreen" type="Control"]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme = ExtResource("2")
|
||||||
script = ExtResource("1")
|
script = ExtResource("1")
|
||||||
|
|
||||||
[node name="Background" type="ColorRect" parent="."]
|
[node name="Background" type="ColorRect" parent="."]
|
||||||
@@ -14,29 +18,39 @@ layout_mode = 1
|
|||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 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="."]
|
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/separation = 20
|
theme_override_constants/separation = 24
|
||||||
|
|
||||||
[node name="Logo" type="Label" parent="CenterContainer/VBoxContainer"]
|
[node name="Logo" type="Label" parent="CenterContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 52
|
||||||
text = "TEKTON"
|
text = "TEKTON"
|
||||||
horizontal_alignment = 1
|
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"]
|
[node name="StatusLabel" type="Label" parent="CenterContainer/VBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
|
||||||
theme_override_font_sizes/font_size = 16
|
theme_override_font_sizes/font_size = 16
|
||||||
text = "Checking for updates..."
|
text = "Checking for updates..."
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
@@ -45,17 +59,17 @@ horizontal_alignment = 1
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 8
|
||||||
|
|
||||||
[node name="ProgressBar" type="ProgressBar" parent="CenterContainer/VBoxContainer/ProgressContainer"]
|
[node name="ProgressBar" type="ProgressBar" parent="CenterContainer/VBoxContainer/ProgressContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(320, 24)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(300, 20)
|
|
||||||
show_percentage = false
|
show_percentage = false
|
||||||
|
|
||||||
[node name="ProgressLabel" type="Label" parent="CenterContainer/VBoxContainer/ProgressContainer"]
|
[node name="ProgressLabel" type="Label" parent="CenterContainer/VBoxContainer/ProgressContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
|
||||||
text = "0%"
|
text = "0%"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
@@ -63,25 +77,26 @@ horizontal_alignment = 1
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 16
|
||||||
alignment = 1
|
alignment = 1
|
||||||
|
|
||||||
[node name="UpdateButton" type="Button" parent="CenterContainer/VBoxContainer/ButtonContainer"]
|
[node name="UpdateButton" type="Button" parent="CenterContainer/VBoxContainer/ButtonContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(160, 48)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(140, 40)
|
|
||||||
text = "Update Now"
|
text = "Update Now"
|
||||||
|
|
||||||
[node name="SkipButton" type="Button" parent="CenterContainer/VBoxContainer/ButtonContainer"]
|
[node name="SkipButton" type="Button" parent="CenterContainer/VBoxContainer/ButtonContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(160, 48)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(140, 40)
|
|
||||||
text = "Play Anyway"
|
text = "Play Anyway"
|
||||||
|
|
||||||
[node name="StoreButton" type="Button" parent="CenterContainer/VBoxContainer/ButtonContainer"]
|
[node name="StoreButton" type="Button" parent="CenterContainer/VBoxContainer/ButtonContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
visible = false
|
visible = false
|
||||||
|
custom_minimum_size = Vector2(160, 48)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(140, 40)
|
|
||||||
text = "Open Store"
|
text = "Open Store"
|
||||||
|
|
||||||
[node name="VersionLabel" type="Label" parent="."]
|
[node name="VersionLabel" type="Label" parent="."]
|
||||||
@@ -91,11 +106,13 @@ anchor_left = 1.0
|
|||||||
anchor_top = 1.0
|
anchor_top = 1.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
offset_left = -100.0
|
offset_left = -120.0
|
||||||
offset_top = -30.0
|
offset_top = -40.0
|
||||||
offset_right = -10.0
|
offset_right = -16.0
|
||||||
offset_bottom = -10.0
|
offset_bottom = -16.0
|
||||||
theme_override_colors/font_color = Color(0.4, 0.4, 0.5, 1)
|
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
|
theme_override_font_sizes/font_size = 12
|
||||||
text = "v1.0.0"
|
text = "v1.0.0"
|
||||||
horizontal_alignment = 2
|
horizontal_alignment = 2
|
||||||
|
|||||||
+50
-3
@@ -31,6 +31,7 @@ extends Control
|
|||||||
# UI References - User Profile Bar (will be added to scene)
|
# UI References - User Profile Bar (will be added to scene)
|
||||||
var user_profile_bar: Control
|
var user_profile_bar: Control
|
||||||
var profile_panel_instance: Control
|
var profile_panel_instance: Control
|
||||||
|
var admin_panel_instance: Control
|
||||||
|
|
||||||
# Store current match ID for copy function
|
# Store current match ID for copy function
|
||||||
var current_match_id: String = ""
|
var current_match_id: String = ""
|
||||||
@@ -38,8 +39,8 @@ var current_match_id: String = ""
|
|||||||
func _ready():
|
func _ready():
|
||||||
# Check if user is authenticated
|
# Check if user is authenticated
|
||||||
if not AuthManager.is_logged_in():
|
if not AuthManager.is_logged_in():
|
||||||
# Redirect to login screen
|
# Redirect to login screen - must use deferred call during _ready()
|
||||||
get_tree().change_scene_to_file("res://scenes/ui/login_screen.tscn")
|
call_deferred("_go_to_login")
|
||||||
return
|
return
|
||||||
|
|
||||||
# Initialize user profile bar
|
# Initialize user profile bar
|
||||||
@@ -125,6 +126,14 @@ func _create_profile_bar() -> Control:
|
|||||||
profile_btn.pressed.connect(_on_profile_btn_pressed)
|
profile_btn.pressed.connect(_on_profile_btn_pressed)
|
||||||
bar.add_child(profile_btn)
|
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
|
# Logout button
|
||||||
var logout_btn := Button.new()
|
var logout_btn := Button.new()
|
||||||
logout_btn.name = "LogoutBtn"
|
logout_btn.name = "LogoutBtn"
|
||||||
@@ -151,6 +160,13 @@ func _update_profile_bar() -> void:
|
|||||||
var avatar_url := UserProfileManager.get_avatar_url()
|
var avatar_url := UserProfileManager.get_avatar_url()
|
||||||
if ResourceLoader.exists(avatar_url):
|
if ResourceLoader.exists(avatar_url):
|
||||||
avatar.texture = load(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:
|
func _on_profile_btn_pressed() -> void:
|
||||||
# Show profile panel
|
# Show profile panel
|
||||||
@@ -167,7 +183,38 @@ func _on_profile_btn_pressed() -> void:
|
|||||||
|
|
||||||
func _on_logout_pressed() -> void:
|
func _on_logout_pressed() -> void:
|
||||||
AuthManager.logout()
|
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
|
# 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)
|
add_child(obstacle_manager)
|
||||||
obstacle_manager.initialize($EnhancedGridMap)
|
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():
|
func _setup_obstacle_ui():
|
||||||
var obstacle_button = Button.new()
|
var obstacle_button = Button.new()
|
||||||
obstacle_button.text = "Place Obstacle"
|
obstacle_button.text = "Place Obstacle"
|
||||||
|
|||||||
@@ -9299,6 +9299,31 @@ offset_right = 24.0
|
|||||||
offset_bottom = 24.0
|
offset_bottom = 24.0
|
||||||
texture = ExtResource("10_my1qp")
|
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/Host" to="." method="_on_host_pressed"]
|
||||||
[connection signal="pressed" from="Menu/Join" to="." method="_on_join_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"]
|
[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")
|
@rpc("any_peer", "call_local")
|
||||||
func display_message(message):
|
func display_message(message):
|
||||||
$Bubble.show()
|
# Send message to the main scene's message bar instead of player bubble
|
||||||
$Bubble/Message.show()
|
var main = get_tree().get_root().get_node_or_null("Main")
|
||||||
$Bubble/Message.text = str(message)
|
if main and main.has_method("add_message_to_bar"):
|
||||||
await get_tree().create_timer(3).timeout
|
var player_name = $Name.text.split("\n")[0] if $Name else str(name)
|
||||||
$Bubble.hide()
|
main.add_message_to_bar(player_name, message)
|
||||||
$Bubble/Message.hide()
|
|
||||||
|
|
||||||
func initialize_random_goals(_size: int, min_value: int, max_value: int, null_count: float) -> Array[int]:
|
func initialize_random_goals(_size: int, min_value: int, max_value: int, null_count: float) -> Array[int]:
|
||||||
goals.clear()
|
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"]
|
[node name="AdminPanel" type="PanelContainer"]
|
||||||
anchors_preset = 0
|
offset_right = 480.0
|
||||||
offset_right = 450.0
|
offset_bottom = 520.0
|
||||||
offset_bottom = 500.0
|
theme = ExtResource("2")
|
||||||
script = ExtResource("1")
|
script = ExtResource("1")
|
||||||
|
|
||||||
[node name="VBox" type="VBoxContainer" parent="."]
|
[node name="VBox" type="VBoxContainer" parent="."]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/separation = 10
|
theme_override_constants/separation = 12
|
||||||
|
|
||||||
[node name="Header" type="HBoxContainer" parent="VBox"]
|
[node name="Header" type="HBoxContainer" parent="VBox"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -18,47 +19,53 @@ layout_mode = 2
|
|||||||
[node name="Title" type="Label" parent="VBox/Header"]
|
[node name="Title" type="Label" parent="VBox/Header"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
theme_override_colors/font_color = Color(1, 0.4, 0.4, 1)
|
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||||
theme_override_font_sizes/font_size = 20
|
theme_override_font_sizes/font_size = 22
|
||||||
text = "⚙ Admin Panel"
|
text = "⚙ Admin Panel"
|
||||||
|
|
||||||
[node name="CloseButton" type="Button" parent="VBox/Header"]
|
[node name="CloseButton" type="Button" parent="VBox/Header"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(36, 36)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(30, 30)
|
|
||||||
text = "✕"
|
text = "✕"
|
||||||
|
|
||||||
[node name="TabContainer" type="TabContainer" parent="VBox"]
|
[node name="TabContainer" type="TabContainer" parent="VBox"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
current_tab = 0
|
||||||
|
|
||||||
[node name="Players" type="VBoxContainer" parent="VBox/TabContainer"]
|
[node name="Players" type="VBoxContainer" parent="VBox/TabContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 10
|
||||||
metadata/_tab_index = 0
|
metadata/_tab_index = 0
|
||||||
|
|
||||||
[node name="PlayerList" type="ItemList" parent="VBox/TabContainer/Players"]
|
[node name="PlayerList" type="ItemList" parent="VBox/TabContainer/Players"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 180)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
custom_minimum_size = Vector2(0, 150)
|
|
||||||
|
|
||||||
[node name="PlayerActions" type="HBoxContainer" parent="VBox/TabContainer/Players"]
|
[node name="PlayerActions" type="HBoxContainer" parent="VBox/TabContainer/Players"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 10
|
||||||
|
|
||||||
[node name="KickBtn" type="Button" parent="VBox/TabContainer/Players/PlayerActions"]
|
[node name="KickBtn" type="Button" parent="VBox/TabContainer/Players/PlayerActions"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
text = "Kick"
|
text = "Kick"
|
||||||
|
|
||||||
[node name="BanBtn" type="Button" parent="VBox/TabContainer/Players/PlayerActions"]
|
[node name="BanBtn" type="Button" parent="VBox/TabContainer/Players/PlayerActions"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
text = "Ban"
|
text = "Ban"
|
||||||
|
|
||||||
[node name="MuteBtn" type="Button" parent="VBox/TabContainer/Players/PlayerActions"]
|
[node name="MuteBtn" type="Button" parent="VBox/TabContainer/Players/PlayerActions"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
text = "Mute"
|
text = "Mute"
|
||||||
@@ -66,6 +73,7 @@ text = "Mute"
|
|||||||
[node name="Server" type="VBoxContainer" parent="VBox/TabContainer"]
|
[node name="Server" type="VBoxContainer" parent="VBox/TabContainer"]
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 10
|
||||||
metadata/_tab_index = 1
|
metadata/_tab_index = 1
|
||||||
|
|
||||||
[node name="StatsGrid" type="GridContainer" parent="VBox/TabContainer/Server"]
|
[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"]
|
[node name="PlayerCount" type="Label" parent="VBox/TabContainer/Server/StatsGrid"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||||
text = "0"
|
text = "0"
|
||||||
|
|
||||||
[node name="Label2" type="Label" parent="VBox/TabContainer/Server/StatsGrid"]
|
[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"]
|
[node name="MatchIdLabel" type="Label" parent="VBox/TabContainer/Server/StatsGrid"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
|
||||||
text = "N/A"
|
text = "N/A"
|
||||||
|
|
||||||
[node name="Label3" type="Label" parent="VBox/TabContainer/Server/StatsGrid"]
|
[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"]
|
[node name="ServerStatus" type="Label" parent="VBox/TabContainer/Server/StatsGrid"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
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"
|
text = "Running"
|
||||||
|
|
||||||
[node name="ServerActions" type="VBoxContainer" parent="VBox/TabContainer/Server"]
|
[node name="ServerActions" type="VBoxContainer" parent="VBox/TabContainer/Server"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 8
|
||||||
|
|
||||||
[node name="EndMatchBtn" type="Button" parent="VBox/TabContainer/Server/ServerActions"]
|
[node name="EndMatchBtn" type="Button" parent="VBox/TabContainer/Server/ServerActions"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "End Match"
|
text = "End Match"
|
||||||
|
|
||||||
[node name="RestartMatchBtn" type="Button" parent="VBox/TabContainer/Server/ServerActions"]
|
[node name="RestartMatchBtn" type="Button" parent="VBox/TabContainer/Server/ServerActions"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Restart Match"
|
text = "Restart Match"
|
||||||
|
|
||||||
[node name="Bans" type="VBoxContainer" parent="VBox/TabContainer"]
|
[node name="Bans" type="VBoxContainer" parent="VBox/TabContainer"]
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 10
|
||||||
metadata/_tab_index = 2
|
metadata/_tab_index = 2
|
||||||
|
|
||||||
[node name="BanList" type="ItemList" parent="VBox/TabContainer/Bans"]
|
[node name="BanList" type="ItemList" parent="VBox/TabContainer/Bans"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 180)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
custom_minimum_size = Vector2(0, 150)
|
|
||||||
|
|
||||||
[node name="UnbanBtn" type="Button" parent="VBox/TabContainer/Bans"]
|
[node name="UnbanBtn" type="Button" parent="VBox/TabContainer/Bans"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Unban Selected"
|
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"]
|
[node name="LoginScreen" type="Control"]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme = ExtResource("2")
|
||||||
script = ExtResource("1")
|
script = ExtResource("1")
|
||||||
|
|
||||||
[node name="Background" type="ColorRect" parent="."]
|
[node name="Background" type="ColorRect" parent="."]
|
||||||
@@ -14,17 +18,21 @@ layout_mode = 1
|
|||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 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="."]
|
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
[node name="MainPanel" type="PanelContainer" parent="CenterContainer"]
|
[node name="MainPanel" type="PanelContainer" parent="CenterContainer"]
|
||||||
layout_mode = 2
|
|
||||||
custom_minimum_size = Vector2(400, 0)
|
custom_minimum_size = Vector2(400, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="VBox" type="VBoxContainer" parent="CenterContainer/MainPanel"]
|
[node name="VBox" type="VBoxContainer" parent="CenterContainer/MainPanel"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -32,49 +40,49 @@ theme_override_constants/separation = 16
|
|||||||
|
|
||||||
[node name="LogoLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
[node name="LogoLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 48
|
||||||
text = "TEKTON"
|
text = "TEKTON"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="SubtitleLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
[node name="SubtitleLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 14
|
||||||
text = "Tactical Multiplayer"
|
text = "Armageddon"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="Spacer1" type="Control" parent="CenterContainer/MainPanel/VBox"]
|
[node name="Spacer1" type="Control" parent="CenterContainer/MainPanel/VBox"]
|
||||||
|
custom_minimum_size = Vector2(0, 16)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(0, 20)
|
|
||||||
|
|
||||||
[node name="GuestButton" type="Button" parent="CenterContainer/MainPanel/VBox"]
|
[node name="GuestButton" type="Button" parent="CenterContainer/MainPanel/VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 52)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(0, 50)
|
|
||||||
theme_override_font_sizes/font_size = 18
|
theme_override_font_sizes/font_size = 18
|
||||||
text = "▶ PLAY AS GUEST"
|
text = "▶ PLAY AS GUEST"
|
||||||
|
|
||||||
[node name="Spacer2" type="Control" parent="CenterContainer/MainPanel/VBox"]
|
[node name="Spacer2" type="Control" parent="CenterContainer/MainPanel/VBox"]
|
||||||
|
custom_minimum_size = Vector2(0, 8)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(0, 10)
|
|
||||||
|
|
||||||
[node name="OrLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
[node name="OrLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
||||||
layout_mode = 2
|
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 ───────"
|
text = "─────── or sign in ───────"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="EmailInput" type="LineEdit" parent="CenterContainer/MainPanel/VBox"]
|
[node name="EmailInput" type="LineEdit" parent="CenterContainer/MainPanel/VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(0, 40)
|
|
||||||
placeholder_text = "Email"
|
placeholder_text = "Email"
|
||||||
|
|
||||||
[node name="PasswordInput" type="LineEdit" parent="CenterContainer/MainPanel/VBox"]
|
[node name="PasswordInput" type="LineEdit" parent="CenterContainer/MainPanel/VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(0, 40)
|
|
||||||
placeholder_text = "Password"
|
placeholder_text = "Password"
|
||||||
secret = true
|
secret = true
|
||||||
|
|
||||||
@@ -86,46 +94,46 @@ text = "Remember me"
|
|||||||
|
|
||||||
[node name="LoginButton" type="Button" parent="CenterContainer/MainPanel/VBox"]
|
[node name="LoginButton" type="Button" parent="CenterContainer/MainPanel/VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 48)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(0, 45)
|
|
||||||
text = "Sign In"
|
text = "Sign In"
|
||||||
|
|
||||||
[node name="RegisterLink" type="LinkButton" parent="CenterContainer/MainPanel/VBox"]
|
[node name="RegisterLink" type="LinkButton" parent="CenterContainer/MainPanel/VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Don't have an account? Register"
|
text = "Don't have an account? Register"
|
||||||
horizontal_alignment = 1
|
|
||||||
|
|
||||||
[node name="Spacer3" type="Control" parent="CenterContainer/MainPanel/VBox"]
|
[node name="Spacer3" type="Control" parent="CenterContainer/MainPanel/VBox"]
|
||||||
|
custom_minimum_size = Vector2(0, 8)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(0, 10)
|
|
||||||
|
|
||||||
[node name="SocialLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
[node name="SocialLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
||||||
layout_mode = 2
|
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 ───────"
|
text = "─────── or continue with ───────"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="SocialButtons" type="HBoxContainer" parent="CenterContainer/MainPanel/VBox"]
|
[node name="SocialButtons" type="HBoxContainer" parent="CenterContainer/MainPanel/VBox"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 12
|
||||||
alignment = 1
|
alignment = 1
|
||||||
|
|
||||||
[node name="GoogleButton" type="Button" parent="CenterContainer/MainPanel/VBox/SocialButtons"]
|
[node name="GoogleButton" type="Button" parent="CenterContainer/MainPanel/VBox/SocialButtons"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(100, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(100, 40)
|
|
||||||
text = "Google"
|
text = "Google"
|
||||||
|
|
||||||
[node name="AppleButton" type="Button" parent="CenterContainer/MainPanel/VBox/SocialButtons"]
|
[node name="AppleButton" type="Button" parent="CenterContainer/MainPanel/VBox/SocialButtons"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(100, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(100, 40)
|
|
||||||
text = "Apple"
|
text = "Apple"
|
||||||
|
|
||||||
[node name="FacebookButton" type="Button" parent="CenterContainer/MainPanel/VBox/SocialButtons"]
|
[node name="FacebookButton" type="Button" parent="CenterContainer/MainPanel/VBox/SocialButtons"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(100, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(100, 40)
|
|
||||||
text = "Facebook"
|
text = "Facebook"
|
||||||
|
|
||||||
[node name="StatusLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
[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"]
|
[node name="LoadingSpinner" type="TextureProgressBar" parent="CenterContainer/MainPanel/VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 2
|
|
||||||
custom_minimum_size = Vector2(40, 40)
|
custom_minimum_size = Vector2(40, 40)
|
||||||
|
layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
size_flags_horizontal = 4
|
||||||
|
|
||||||
[node name="RegistrationPanel" type="PanelContainer" parent="CenterContainer"]
|
[node name="RegistrationPanel" type="PanelContainer" parent="CenterContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 2
|
|
||||||
custom_minimum_size = Vector2(400, 0)
|
custom_minimum_size = Vector2(400, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="VBox" type="VBoxContainer" parent="CenterContainer/RegistrationPanel"]
|
[node name="VBox" type="VBoxContainer" parent="CenterContainer/RegistrationPanel"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -154,63 +162,62 @@ theme_override_constants/separation = 12
|
|||||||
|
|
||||||
[node name="Title" type="Label" parent="CenterContainer/RegistrationPanel/VBox"]
|
[node name="Title" type="Label" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 24
|
||||||
text = "Create Account"
|
text = "Create Account"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="RegEmailInput" type="LineEdit" parent="CenterContainer/RegistrationPanel/VBox"]
|
[node name="RegEmailInput" type="LineEdit" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(0, 40)
|
|
||||||
placeholder_text = "Email"
|
placeholder_text = "Email"
|
||||||
|
|
||||||
[node name="RegUsernameInput" type="LineEdit" parent="CenterContainer/RegistrationPanel/VBox"]
|
[node name="RegUsernameInput" type="LineEdit" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(0, 40)
|
|
||||||
placeholder_text = "Username"
|
placeholder_text = "Username"
|
||||||
|
|
||||||
[node name="RegPasswordInput" type="LineEdit" parent="CenterContainer/RegistrationPanel/VBox"]
|
[node name="RegPasswordInput" type="LineEdit" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(0, 40)
|
|
||||||
placeholder_text = "Password"
|
placeholder_text = "Password"
|
||||||
secret = true
|
secret = true
|
||||||
|
|
||||||
[node name="RegConfirmPasswordInput" type="LineEdit" parent="CenterContainer/RegistrationPanel/VBox"]
|
[node name="RegConfirmPasswordInput" type="LineEdit" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(0, 40)
|
|
||||||
placeholder_text = "Confirm Password"
|
placeholder_text = "Confirm Password"
|
||||||
secret = true
|
secret = true
|
||||||
|
|
||||||
[node name="PasswordStrength" type="ProgressBar" parent="CenterContainer/RegistrationPanel/VBox"]
|
[node name="PasswordStrength" type="ProgressBar" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 12)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(0, 8)
|
|
||||||
max_value = 4.0
|
max_value = 4.0
|
||||||
show_percentage = false
|
show_percentage = false
|
||||||
|
|
||||||
[node name="PasswordHint" type="Label" parent="CenterContainer/RegistrationPanel/VBox"]
|
[node name="PasswordHint" type="Label" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
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
|
theme_override_font_sizes/font_size = 11
|
||||||
text = "Min 8 characters, include number and symbol"
|
text = "Min 8 characters, include number and symbol"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="RegisterButton" type="Button" parent="CenterContainer/RegistrationPanel/VBox"]
|
[node name="RegisterButton" type="Button" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 48)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(0, 45)
|
|
||||||
text = "Create Account"
|
text = "Create Account"
|
||||||
|
|
||||||
[node name="BackToLoginLink" type="LinkButton" parent="CenterContainer/RegistrationPanel/VBox"]
|
[node name="BackToLoginLink" type="LinkButton" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Already have an account? Sign In"
|
text = "Already have an account? Sign In"
|
||||||
horizontal_alignment = 1
|
|
||||||
|
|
||||||
[node name="RegStatusLabel" type="Label" parent="CenterContainer/RegistrationPanel/VBox"]
|
[node name="RegStatusLabel" type="Label" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
@@ -226,11 +233,13 @@ anchor_left = 1.0
|
|||||||
anchor_top = 1.0
|
anchor_top = 1.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
offset_left = -100.0
|
offset_left = -120.0
|
||||||
offset_top = -25.0
|
offset_top = -40.0
|
||||||
offset_right = -10.0
|
offset_right = -16.0
|
||||||
offset_bottom = -10.0
|
offset_bottom = -16.0
|
||||||
theme_override_colors/font_color = Color(0.3, 0.3, 0.4, 1)
|
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
|
theme_override_font_sizes/font_size = 11
|
||||||
text = "v1.0.0"
|
text = "v1.0.0"
|
||||||
horizontal_alignment = 2
|
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"]
|
[node name="ProfilePanel" type="PanelContainer"]
|
||||||
anchors_preset = 0
|
offset_right = 380.0
|
||||||
offset_right = 350.0
|
offset_bottom = 480.0
|
||||||
offset_bottom = 400.0
|
theme = ExtResource("2")
|
||||||
script = ExtResource("1")
|
script = ExtResource("1")
|
||||||
|
|
||||||
[node name="VBox" type="VBoxContainer" parent="."]
|
[node name="VBox" type="VBoxContainer" parent="."]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/separation = 12
|
theme_override_constants/separation = 14
|
||||||
|
|
||||||
[node name="Header" type="HBoxContainer" parent="VBox"]
|
[node name="Header" type="HBoxContainer" parent="VBox"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -18,55 +19,61 @@ layout_mode = 2
|
|||||||
[node name="Title" type="Label" parent="VBox/Header"]
|
[node name="Title" type="Label" parent="VBox/Header"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
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 = 20
|
theme_override_font_sizes/font_size = 22
|
||||||
text = "Profile"
|
text = "Profile"
|
||||||
|
|
||||||
[node name="CloseButton" type="Button" parent="VBox/Header"]
|
[node name="CloseButton" type="Button" parent="VBox/Header"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(36, 36)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(30, 30)
|
|
||||||
text = "✕"
|
text = "✕"
|
||||||
|
|
||||||
[node name="AvatarSection" type="HBoxContainer" parent="VBox"]
|
[node name="AvatarSection" type="HBoxContainer" parent="VBox"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 16
|
||||||
alignment = 1
|
alignment = 1
|
||||||
|
|
||||||
[node name="AvatarDisplay" type="TextureRect" parent="VBox/AvatarSection"]
|
[node name="AvatarDisplay" type="TextureRect" parent="VBox/AvatarSection"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(88, 88)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
custom_minimum_size = Vector2(80, 80)
|
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
stretch_mode = 5
|
stretch_mode = 5
|
||||||
|
|
||||||
[node name="AvatarButtons" type="VBoxContainer" parent="VBox/AvatarSection"]
|
[node name="AvatarButtons" type="VBoxContainer" parent="VBox/AvatarSection"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 8
|
||||||
|
|
||||||
[node name="ChangeAvatarBtn" type="Button" parent="VBox/AvatarSection/AvatarButtons"]
|
[node name="ChangeAvatarBtn" type="Button" parent="VBox/AvatarSection/AvatarButtons"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Change Avatar"
|
text = "Change Avatar"
|
||||||
|
|
||||||
[node name="DisplayNameSection" type="VBoxContainer" parent="VBox"]
|
[node name="DisplayNameSection" type="VBoxContainer" parent="VBox"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 8
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="VBox/DisplayNameSection"]
|
[node name="Label" type="Label" parent="VBox/DisplayNameSection"]
|
||||||
layout_mode = 2
|
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"
|
text = "Display Name"
|
||||||
|
|
||||||
[node name="HBox" type="HBoxContainer" parent="VBox/DisplayNameSection"]
|
[node name="HBox" type="HBoxContainer" parent="VBox/DisplayNameSection"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 8
|
||||||
|
|
||||||
[node name="DisplayNameInput" type="LineEdit" parent="VBox/DisplayNameSection/HBox"]
|
[node name="DisplayNameInput" type="LineEdit" parent="VBox/DisplayNameSection/HBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
custom_minimum_size = Vector2(0, 35)
|
|
||||||
max_length = 50
|
max_length = 50
|
||||||
|
|
||||||
[node name="SaveNameBtn" type="Button" parent="VBox/DisplayNameSection/HBox"]
|
[node name="SaveNameBtn" type="Button" parent="VBox/DisplayNameSection/HBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(80, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Save"
|
text = "Save"
|
||||||
|
|
||||||
@@ -75,10 +82,12 @@ layout_mode = 2
|
|||||||
|
|
||||||
[node name="StatsSection" type="VBoxContainer" parent="VBox"]
|
[node name="StatsSection" type="VBoxContainer" parent="VBox"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 6
|
||||||
|
|
||||||
[node name="StatsTitle" type="Label" parent="VBox/StatsSection"]
|
[node name="StatsTitle" type="Label" parent="VBox/StatsSection"]
|
||||||
layout_mode = 2
|
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"
|
text = "Statistics"
|
||||||
|
|
||||||
[node name="GamesPlayed" type="Label" parent="VBox/StatsSection"]
|
[node name="GamesPlayed" type="Label" parent="VBox/StatsSection"]
|
||||||
@@ -101,20 +110,23 @@ layout_mode = 2
|
|||||||
|
|
||||||
[node name="AccountSection" type="VBoxContainer" parent="VBox"]
|
[node name="AccountSection" type="VBoxContainer" parent="VBox"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 8
|
||||||
|
|
||||||
[node name="AccountType" type="Label" parent="VBox/AccountSection"]
|
[node name="AccountType" type="Label" parent="VBox/AccountSection"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
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"
|
text = "Account: Guest"
|
||||||
|
|
||||||
[node name="LinkAccountBtn" type="Button" parent="VBox/AccountSection"]
|
[node name="LinkAccountBtn" type="Button" parent="VBox/AccountSection"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Link Email (Keep Progress)"
|
text = "Link Email (Keep Progress)"
|
||||||
|
|
||||||
[node name="LogoutBtn" type="Button" parent="VBox/AccountSection"]
|
[node name="LogoutBtn" type="Button" parent="VBox/AccountSection"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 44)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Logout"
|
text = "Logout"
|
||||||
|
|
||||||
@@ -127,12 +139,12 @@ horizontal_alignment = 1
|
|||||||
[node name="AvatarSelectionPopup" type="PopupPanel" parent="."]
|
[node name="AvatarSelectionPopup" type="PopupPanel" parent="."]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
title = "Select Avatar"
|
title = "Select Avatar"
|
||||||
size = Vector2i(300, 200)
|
size = Vector2i(320, 220)
|
||||||
|
|
||||||
[node name="GridContainer" type="GridContainer" parent="AvatarSelectionPopup"]
|
[node name="GridContainer" type="GridContainer" parent="AvatarSelectionPopup"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
offset_left = 10.0
|
offset_left = 4.0
|
||||||
offset_top = 10.0
|
offset_top = 4.0
|
||||||
offset_right = 290.0
|
offset_right = 316.0
|
||||||
offset_bottom = 190.0
|
offset_bottom = 216.0
|
||||||
columns = 3
|
columns = 3
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ signal session_restored
|
|||||||
signal logged_out
|
signal logged_out
|
||||||
|
|
||||||
# Auth modes
|
# Auth modes
|
||||||
enum AuthMode { GUEST, EMAIL, GOOGLE, APPLE, FACEBOOK, CUSTOM }
|
enum AuthMode {GUEST, EMAIL, GOOGLE, APPLE, FACEBOOK, CUSTOM}
|
||||||
|
|
||||||
# User data
|
# User data
|
||||||
var current_user: Dictionary = {}
|
var current_user: Dictionary = {}
|
||||||
@@ -43,7 +43,7 @@ func _try_restore_session() -> void:
|
|||||||
print("[AuthManager] Could not open session file")
|
print("[AuthManager] Could not open session file")
|
||||||
return
|
return
|
||||||
|
|
||||||
var session_data := file.get_var()
|
var session_data = file.get_var()
|
||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
if not session_data or not session_data is Dictionary:
|
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...")
|
print("[AuthManager] Attempting to restore session...")
|
||||||
|
|
||||||
# Try to restore the session
|
# Try to restore the session
|
||||||
var session := NakamaClient.restore_session(token)
|
var session = NakamaClient.restore_session(token)
|
||||||
|
|
||||||
if session.is_expired():
|
if session.is_expired():
|
||||||
# Try to refresh
|
# Try to refresh
|
||||||
@@ -379,7 +379,7 @@ func _connect_socket() -> bool:
|
|||||||
return true
|
return true
|
||||||
|
|
||||||
NakamaManager.socket = Nakama.create_socket_from(NakamaManager.client)
|
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():
|
if result.is_exception():
|
||||||
push_error("[AuthManager] Socket connection failed: " + result.get_exception().message)
|
push_error("[AuthManager] Socket connection failed: " + result.get_exception().message)
|
||||||
@@ -397,7 +397,7 @@ func _load_user_profile() -> void:
|
|||||||
if not NakamaManager.session:
|
if not NakamaManager.session:
|
||||||
return
|
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():
|
if account.is_exception():
|
||||||
push_error("[AuthManager] Failed to load account")
|
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 {}
|
return {}
|
||||||
|
|
||||||
# First get basic account info
|
# 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():
|
if account.is_exception():
|
||||||
push_error("[UserProfileManager] Failed to load account")
|
push_error("[UserProfileManager] Failed to load account")
|
||||||
@@ -70,7 +70,7 @@ func load_profile() -> Dictionary:
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Load custom profile data from storage
|
# 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,
|
NakamaManager.session,
|
||||||
[NakamaStorageObjectId.new(PROFILE_COLLECTION, "profile", account.user.id)]
|
[NakamaStorageObjectId.new(PROFILE_COLLECTION, "profile", account.user.id)]
|
||||||
)
|
)
|
||||||
@@ -93,7 +93,7 @@ func load_stats() -> Dictionary:
|
|||||||
|
|
||||||
var user_id := NakamaManager.session.user_id
|
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,
|
NakamaManager.session,
|
||||||
[NakamaStorageObjectId.new(STATS_COLLECTION, "game_stats", user_id)]
|
[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(
|
var result := await NakamaManager.client.update_account_async(
|
||||||
NakamaManager.session,
|
NakamaManager.session,
|
||||||
null, # username (don't change)
|
null, # username (don't change)
|
||||||
new_name # display_name
|
new_name # display_name
|
||||||
)
|
)
|
||||||
|
|
||||||
if result.is_exception():
|
if result.is_exception():
|
||||||
@@ -188,13 +188,13 @@ func _save_profile_data() -> bool:
|
|||||||
var write_obj := NakamaWriteStorageObject.new(
|
var write_obj := NakamaWriteStorageObject.new(
|
||||||
PROFILE_COLLECTION,
|
PROFILE_COLLECTION,
|
||||||
"profile",
|
"profile",
|
||||||
2, # Public read
|
2, # Public read
|
||||||
1, # Owner write
|
1, # Owner write
|
||||||
JSON.stringify(custom_data),
|
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,
|
NakamaManager.session,
|
||||||
[write_obj]
|
[write_obj]
|
||||||
)
|
)
|
||||||
@@ -219,13 +219,13 @@ func update_stats(new_stats: Dictionary) -> bool:
|
|||||||
var write_obj := NakamaWriteStorageObject.new(
|
var write_obj := NakamaWriteStorageObject.new(
|
||||||
STATS_COLLECTION,
|
STATS_COLLECTION,
|
||||||
"game_stats",
|
"game_stats",
|
||||||
2, # Public read
|
2, # Public read
|
||||||
1, # Owner write
|
1, # Owner write
|
||||||
JSON.stringify(stats),
|
JSON.stringify(stats),
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
|
|
||||||
var result := await NakamaManager.client.write_storage_objects_async(
|
var result = await NakamaManager.client.write_storage_objects_async(
|
||||||
NakamaManager.session,
|
NakamaManager.session,
|
||||||
[write_obj]
|
[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 = ""
|
reg_status_label.text = ""
|
||||||
|
|
||||||
func _on_auth_completed(success: bool, _user_data: Dictionary) -> void:
|
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
|
is_loading = false
|
||||||
loading_spinner.visible = false
|
loading_spinner.visible = false
|
||||||
_set_inputs_enabled(true)
|
_set_inputs_enabled(true)
|
||||||
@@ -301,6 +305,8 @@ func _on_auth_failed(error: String) -> void:
|
|||||||
_show_error(error)
|
_show_error(error)
|
||||||
|
|
||||||
func _on_session_restored() -> void:
|
func _on_session_restored() -> void:
|
||||||
|
if not is_inside_tree():
|
||||||
|
return
|
||||||
_go_to_lobby()
|
_go_to_lobby()
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
@@ -336,5 +342,13 @@ func _is_valid_email(email: String) -> bool:
|
|||||||
return regex.search(email) != null
|
return regex.search(email) != null
|
||||||
|
|
||||||
func _go_to_lobby() -> void:
|
func _go_to_lobby() -> void:
|
||||||
# Navigate to lobby scene
|
# Navigate to lobby scene - use deferred call to avoid issues during signal callbacks
|
||||||
get_tree().change_scene_to_file("res://assets/models/meshes/lobby.tscn")
|
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