update
This commit is contained in:
+34
-17
@@ -1,12 +1,16 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://boot_screen"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://cyfjwldknv8m6"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/ui/boot_screen.gd" id="1"]
|
||||
[ext_resource type="Script" uid="uid://vgyrq5y5p7jw" path="res://scripts/ui/boot_screen.gd" id="1"]
|
||||
[ext_resource type="Theme" uid="uid://da337sh5qxi0s" path="res://assets/themes/ui_theme.tres" id="2"]
|
||||
|
||||
[node name="BootScreen" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("2")
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="Background" type="ColorRect" parent="."]
|
||||
@@ -14,29 +18,39 @@ layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
color = Color(0.039, 0.039, 0.102, 1)
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.12, 0.1, 0.08, 1)
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 20
|
||||
theme_override_constants/separation = 24
|
||||
|
||||
[node name="Logo" type="Label" parent="CenterContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0, 0.831, 1, 1)
|
||||
theme_override_font_sizes/font_size = 48
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 52
|
||||
text = "TEKTON"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Subtitle" type="Label" parent="CenterContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
|
||||
theme_override_font_sizes/font_size = 14
|
||||
text = "ARMAGEDDON"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="StatusLabel" type="Label" parent="CenterContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "Checking for updates..."
|
||||
horizontal_alignment = 1
|
||||
@@ -45,17 +59,17 @@ horizontal_alignment = 1
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="ProgressBar" type="ProgressBar" parent="CenterContainer/VBoxContainer/ProgressContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(320, 24)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(300, 20)
|
||||
show_percentage = false
|
||||
|
||||
[node name="ProgressLabel" type="Label" parent="CenterContainer/VBoxContainer/ProgressContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
||||
text = "0%"
|
||||
horizontal_alignment = 1
|
||||
|
||||
@@ -63,25 +77,26 @@ horizontal_alignment = 1
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 16
|
||||
alignment = 1
|
||||
|
||||
[node name="UpdateButton" type="Button" parent="CenterContainer/VBoxContainer/ButtonContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(160, 48)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(140, 40)
|
||||
text = "Update Now"
|
||||
|
||||
[node name="SkipButton" type="Button" parent="CenterContainer/VBoxContainer/ButtonContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(160, 48)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(140, 40)
|
||||
text = "Play Anyway"
|
||||
|
||||
[node name="StoreButton" type="Button" parent="CenterContainer/VBoxContainer/ButtonContainer"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(160, 48)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(140, 40)
|
||||
text = "Open Store"
|
||||
|
||||
[node name="VersionLabel" type="Label" parent="."]
|
||||
@@ -91,11 +106,13 @@ anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -100.0
|
||||
offset_top = -30.0
|
||||
offset_right = -10.0
|
||||
offset_bottom = -10.0
|
||||
theme_override_colors/font_color = Color(0.4, 0.4, 0.5, 1)
|
||||
offset_left = -120.0
|
||||
offset_top = -40.0
|
||||
offset_right = -16.0
|
||||
offset_bottom = -16.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 0.6)
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "v1.0.0"
|
||||
horizontal_alignment = 2
|
||||
|
||||
+50
-3
@@ -31,6 +31,7 @@ extends Control
|
||||
# UI References - User Profile Bar (will be added to scene)
|
||||
var user_profile_bar: Control
|
||||
var profile_panel_instance: Control
|
||||
var admin_panel_instance: Control
|
||||
|
||||
# Store current match ID for copy function
|
||||
var current_match_id: String = ""
|
||||
@@ -38,8 +39,8 @@ var current_match_id: String = ""
|
||||
func _ready():
|
||||
# Check if user is authenticated
|
||||
if not AuthManager.is_logged_in():
|
||||
# Redirect to login screen
|
||||
get_tree().change_scene_to_file("res://scenes/ui/login_screen.tscn")
|
||||
# Redirect to login screen - must use deferred call during _ready()
|
||||
call_deferred("_go_to_login")
|
||||
return
|
||||
|
||||
# Initialize user profile bar
|
||||
@@ -125,6 +126,14 @@ func _create_profile_bar() -> Control:
|
||||
profile_btn.pressed.connect(_on_profile_btn_pressed)
|
||||
bar.add_child(profile_btn)
|
||||
|
||||
# Admin button (only visible for admins/hosts)
|
||||
var admin_btn := Button.new()
|
||||
admin_btn.name = "AdminBtn"
|
||||
admin_btn.text = "Admin"
|
||||
admin_btn.visible = false # Hidden by default, shown if user is admin
|
||||
admin_btn.pressed.connect(_on_admin_btn_pressed)
|
||||
bar.add_child(admin_btn)
|
||||
|
||||
# Logout button
|
||||
var logout_btn := Button.new()
|
||||
logout_btn.name = "LogoutBtn"
|
||||
@@ -151,6 +160,13 @@ func _update_profile_bar() -> void:
|
||||
var avatar_url := UserProfileManager.get_avatar_url()
|
||||
if ResourceLoader.exists(avatar_url):
|
||||
avatar.texture = load(avatar_url)
|
||||
|
||||
# Show admin button if user is admin or host
|
||||
var admin_btn := user_profile_bar.get_node_or_null("AdminBtn") as Button
|
||||
if admin_btn:
|
||||
# Check if user is admin (you can define admin check logic here)
|
||||
var is_admin = _check_if_admin()
|
||||
admin_btn.visible = is_admin
|
||||
|
||||
func _on_profile_btn_pressed() -> void:
|
||||
# Show profile panel
|
||||
@@ -167,7 +183,38 @@ func _on_profile_btn_pressed() -> void:
|
||||
|
||||
func _on_logout_pressed() -> void:
|
||||
AuthManager.logout()
|
||||
get_tree().change_scene_to_file("res://scenes/ui/login_screen.tscn")
|
||||
_go_to_login()
|
||||
|
||||
func _go_to_login() -> void:
|
||||
if get_tree():
|
||||
get_tree().change_scene_to_file("res://scenes/ui/login_screen.tscn")
|
||||
|
||||
func _on_admin_btn_pressed() -> void:
|
||||
# Show admin panel
|
||||
if not admin_panel_instance:
|
||||
var admin_panel_scene := load("res://scenes/ui/admin_panel.tscn")
|
||||
admin_panel_instance = admin_panel_scene.instantiate()
|
||||
# Connect close signal if available
|
||||
if admin_panel_instance.has_signal("closed"):
|
||||
admin_panel_instance.closed.connect(func(): admin_panel_instance.hide())
|
||||
add_child(admin_panel_instance)
|
||||
|
||||
admin_panel_instance.show()
|
||||
# Center the panel
|
||||
admin_panel_instance.position = (get_viewport_rect().size - admin_panel_instance.size) / 2
|
||||
|
||||
func _check_if_admin() -> bool:
|
||||
# Check if user is admin - can be host or have specific admin role
|
||||
# You can extend this to check Nakama user metadata or roles
|
||||
if LobbyManager.is_host:
|
||||
return true
|
||||
|
||||
# Check if user has admin role in their profile (optional)
|
||||
var user_id = AuthManager.get_user_id() if AuthManager.has_method("get_user_id") else ""
|
||||
# Add your admin user IDs here or check from Nakama metadata
|
||||
var admin_user_ids = ["admin_user_id_1", "admin_user_id_2"] # Configure as needed
|
||||
|
||||
return user_id in admin_user_ids
|
||||
|
||||
# =============================================================================
|
||||
# Panel Management
|
||||
|
||||
@@ -0,0 +1,286 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://b7nxt2hc4kqp8"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b5q6yekyk0tld" path="res://scenes/lobby.gd" id="1_lp6xi"]
|
||||
[ext_resource type="Theme" uid="uid://da337sh5qxi0s" path="res://assets/themes/ui_theme.tres" id="2_theme"]
|
||||
|
||||
[node name="Lobby" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("2_theme")
|
||||
script = ExtResource("1_lp6xi")
|
||||
|
||||
[node name="Background" type="ColorRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.12, 0.1, 0.08, 1)
|
||||
|
||||
[node name="MainMenuPanel" type="PanelContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -220.0
|
||||
offset_top = -240.0
|
||||
offset_right = 220.0
|
||||
offset_bottom = 240.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MainMenuPanel"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 18
|
||||
|
||||
[node name="TitleContainer" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 4
|
||||
|
||||
[node name="Title" type="Label" parent="MainMenuPanel/VBoxContainer/TitleContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 44
|
||||
text = "TEKTON DASH"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Subtitle" type="Label" parent="MainMenuPanel/VBoxContainer/TitleContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "ARMAGEDDON VERSION"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Separator" type="HSeparator" parent="MainMenuPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="InputSection" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="PlayerNameLabel" type="Label" parent="MainMenuPanel/VBoxContainer/InputSection"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
theme_override_font_sizes/font_size = 13
|
||||
text = "YOUR NAME"
|
||||
|
||||
[node name="PlayerNameInput" type="LineEdit" parent="MainMenuPanel/VBoxContainer/InputSection"]
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
text = "Player"
|
||||
placeholder_text = "Enter your name..."
|
||||
|
||||
[node name="ButtonSection" type="VBoxContainer" parent="MainMenuPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 12
|
||||
|
||||
[node name="CreateRoomBtn" type="Button" parent="MainMenuPanel/VBoxContainer/ButtonSection"]
|
||||
custom_minimum_size = Vector2(0, 48)
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "CREATE ROOM"
|
||||
|
||||
[node name="BrowseRoomsBtn" type="Button" parent="MainMenuPanel/VBoxContainer/ButtonSection"]
|
||||
custom_minimum_size = Vector2(0, 48)
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "BROWSE ROOMS"
|
||||
|
||||
[node name="RoomListPanel" type="PanelContainer" parent="."]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -300.0
|
||||
offset_top = -260.0
|
||||
offset_right = 300.0
|
||||
offset_bottom = 260.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="RoomListPanel"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 14
|
||||
|
||||
[node name="Header" type="Label" parent="RoomListPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 28
|
||||
text = "SERVER BROWSER"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="RoomListPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MatchIdLabel" type="Label" parent="RoomListPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "DIRECT CONNECT (MATCH ID)"
|
||||
|
||||
[node name="MatchIdInput" type="LineEdit" parent="RoomListPanel/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
placeholder_text = "Paste match ID here..."
|
||||
|
||||
[node name="RoomListLabel" type="Label" parent="RoomListPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "AVAILABLE SERVERS"
|
||||
|
||||
[node name="RoomList" type="ItemList" parent="RoomListPanel/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 200)
|
||||
layout_mode = 2
|
||||
allow_reselect = true
|
||||
|
||||
[node name="ButtonContainer" type="HBoxContainer" parent="RoomListPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 14
|
||||
alignment = 1
|
||||
|
||||
[node name="RefreshBtn" type="Button" parent="RoomListPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(110, 44)
|
||||
layout_mode = 2
|
||||
text = "REFRESH"
|
||||
|
||||
[node name="JoinBtn" type="Button" parent="RoomListPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(130, 44)
|
||||
layout_mode = 2
|
||||
text = "JOIN SERVER"
|
||||
|
||||
[node name="BackBtn" type="Button" parent="RoomListPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(110, 44)
|
||||
layout_mode = 2
|
||||
text = "BACK"
|
||||
|
||||
[node name="LobbyPanel" type="PanelContainer" parent="."]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -300.0
|
||||
offset_top = -260.0
|
||||
offset_right = 300.0
|
||||
offset_bottom = 260.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="LobbyPanel"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 14
|
||||
|
||||
[node name="RoomNameHeader" type="Label" parent="LobbyPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 26
|
||||
text = "ROOM: "
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="MatchIdContainer" type="HBoxContainer" parent="LobbyPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="MatchIdDisplay" type="Label" parent="LobbyPanel/VBoxContainer/MatchIdContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.5, 0.5, 0.55, 1)
|
||||
theme_override_font_sizes/font_size = 10
|
||||
text = "Match ID: "
|
||||
|
||||
[node name="CopyIdBtn" type="Button" parent="LobbyPanel/VBoxContainer/MatchIdContainer"]
|
||||
custom_minimum_size = Vector2(80, 32)
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 10
|
||||
text = "COPY"
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="LobbyPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="PlayersLabel" type="Label" parent="LobbyPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
theme_override_font_sizes/font_size = 13
|
||||
text = "PLAYERS"
|
||||
|
||||
[node name="PlayerList" type="ItemList" parent="LobbyPanel/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 160)
|
||||
layout_mode = 2
|
||||
allow_reselect = true
|
||||
|
||||
[node name="StatusLabel" type="Label" parent="LobbyPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
|
||||
theme_override_font_sizes/font_size = 14
|
||||
text = "Waiting for players..."
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="ButtonContainer" type="HBoxContainer" parent="LobbyPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 14
|
||||
alignment = 1
|
||||
|
||||
[node name="ReadyBtn" type="Button" parent="LobbyPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(110, 48)
|
||||
layout_mode = 2
|
||||
toggle_mode = true
|
||||
text = "READY"
|
||||
|
||||
[node name="StartGameBtn" type="Button" parent="LobbyPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(140, 48)
|
||||
layout_mode = 2
|
||||
disabled = true
|
||||
text = "START GAME"
|
||||
|
||||
[node name="LeaveBtn" type="Button" parent="LobbyPanel/VBoxContainer/ButtonContainer"]
|
||||
custom_minimum_size = Vector2(110, 48)
|
||||
layout_mode = 2
|
||||
text = "LEAVE"
|
||||
|
||||
[node name="StatusBar" type="PanelContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 12
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 24.0
|
||||
offset_top = -72.0
|
||||
offset_right = -24.0
|
||||
offset_bottom = -24.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="ConnectionStatus" type="Label" parent="StatusBar"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "NOT CONNECTED"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="VersionLabel" type="Label" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -130.0
|
||||
offset_top = 20.0
|
||||
offset_right = -20.0
|
||||
offset_bottom = 40.0
|
||||
grow_horizontal = 0
|
||||
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 0.6)
|
||||
theme_override_font_sizes/font_size = 11
|
||||
text = "v0.1.0 ALPHA"
|
||||
horizontal_alignment = 2
|
||||
@@ -45,6 +45,49 @@ func _init_managers():
|
||||
add_child(obstacle_manager)
|
||||
obstacle_manager.initialize($EnhancedGridMap)
|
||||
|
||||
# Message Bar Configuration
|
||||
const MAX_MESSAGES := 5
|
||||
const MESSAGE_DURATION := 3.0
|
||||
|
||||
@onready var message_bar: PanelContainer = $MessageBar
|
||||
@onready var message_container: VBoxContainer = $MessageBar/MarginContainer/MessageContainer
|
||||
|
||||
func add_message_to_bar(player_name: String, message: String):
|
||||
if not message_container:
|
||||
return
|
||||
|
||||
# Create message label
|
||||
var label = Label.new()
|
||||
label.text = "[%s] %s" % [player_name, message]
|
||||
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
label.add_theme_color_override("font_color", Color.WHITE)
|
||||
label.add_theme_font_size_override("font_size", 14)
|
||||
|
||||
# Add to container
|
||||
message_container.add_child(label)
|
||||
|
||||
# Show the message bar
|
||||
message_bar.visible = true
|
||||
|
||||
# Remove oldest messages if over limit
|
||||
while message_container.get_child_count() > MAX_MESSAGES:
|
||||
var oldest = message_container.get_child(0)
|
||||
oldest.queue_free()
|
||||
|
||||
# Auto-remove after duration
|
||||
await get_tree().create_timer(MESSAGE_DURATION).timeout
|
||||
if is_instance_valid(label):
|
||||
label.queue_free()
|
||||
|
||||
# Hide bar when empty
|
||||
await get_tree().process_frame
|
||||
if message_container.get_child_count() == 0:
|
||||
message_bar.visible = false
|
||||
|
||||
@rpc("any_peer", "call_local")
|
||||
func broadcast_message(player_name: String, message: String):
|
||||
add_message_to_bar(player_name, message)
|
||||
|
||||
func _setup_obstacle_ui():
|
||||
var obstacle_button = Button.new()
|
||||
obstacle_button.text = "Place Obstacle"
|
||||
|
||||
@@ -9299,6 +9299,31 @@ offset_right = 24.0
|
||||
offset_bottom = 24.0
|
||||
texture = ExtResource("10_my1qp")
|
||||
|
||||
[node name="MessageBar" type="PanelContainer" parent="."]
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -200.0
|
||||
offset_top = -99.0
|
||||
offset_right = 200.0
|
||||
offset_bottom = -41.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
theme_override_styles/panel = ExtResource("5_dvx6y")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="MessageBar"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 10
|
||||
theme_override_constants/margin_top = 5
|
||||
theme_override_constants/margin_right = 10
|
||||
theme_override_constants/margin_bottom = 5
|
||||
|
||||
[node name="MessageContainer" type="VBoxContainer" parent="MessageBar/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 4
|
||||
|
||||
[connection signal="pressed" from="Menu/Host" to="." method="_on_host_pressed"]
|
||||
[connection signal="pressed" from="Menu/Join" to="." method="_on_join_pressed"]
|
||||
[connection signal="text_submitted" from="MessageInput" to="." method="_on_message_input_text_submitted"]
|
||||
|
||||
+5
-6
@@ -664,12 +664,11 @@ func remote_set_position(authority_position):
|
||||
|
||||
@rpc("any_peer", "call_local")
|
||||
func display_message(message):
|
||||
$Bubble.show()
|
||||
$Bubble/Message.show()
|
||||
$Bubble/Message.text = str(message)
|
||||
await get_tree().create_timer(3).timeout
|
||||
$Bubble.hide()
|
||||
$Bubble/Message.hide()
|
||||
# Send message to the main scene's message bar instead of player bubble
|
||||
var main = get_tree().get_root().get_node_or_null("Main")
|
||||
if main and main.has_method("add_message_to_bar"):
|
||||
var player_name = $Name.text.split("\n")[0] if $Name else str(name)
|
||||
main.add_message_to_bar(player_name, message)
|
||||
|
||||
func initialize_random_goals(_size: int, min_value: int, max_value: int, null_count: float) -> Array[int]:
|
||||
goals.clear()
|
||||
|
||||
+27
-12
@@ -1,16 +1,17 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://admin_panel"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://biio8efqysivs"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/ui/admin_panel.gd" id="1"]
|
||||
[ext_resource type="Script" uid="uid://ic8fg0o0p0i4" path="res://scripts/ui/admin_panel.gd" id="1"]
|
||||
[ext_resource type="Theme" uid="uid://da337sh5qxi0s" path="res://assets/themes/ui_theme.tres" id="2"]
|
||||
|
||||
[node name="AdminPanel" type="PanelContainer"]
|
||||
anchors_preset = 0
|
||||
offset_right = 450.0
|
||||
offset_bottom = 500.0
|
||||
offset_right = 480.0
|
||||
offset_bottom = 520.0
|
||||
theme = ExtResource("2")
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="VBox" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
theme_override_constants/separation = 12
|
||||
|
||||
[node name="Header" type="HBoxContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
@@ -18,47 +19,53 @@ layout_mode = 2
|
||||
[node name="Title" type="Label" parent="VBox/Header"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_colors/font_color = Color(1, 0.4, 0.4, 1)
|
||||
theme_override_font_sizes/font_size = 20
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 22
|
||||
text = "⚙ Admin Panel"
|
||||
|
||||
[node name="CloseButton" type="Button" parent="VBox/Header"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(36, 36)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(30, 30)
|
||||
text = "✕"
|
||||
|
||||
[node name="TabContainer" type="TabContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
current_tab = 0
|
||||
|
||||
[node name="Players" type="VBoxContainer" parent="VBox/TabContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
metadata/_tab_index = 0
|
||||
|
||||
[node name="PlayerList" type="ItemList" parent="VBox/TabContainer/Players"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 180)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
custom_minimum_size = Vector2(0, 150)
|
||||
|
||||
[node name="PlayerActions" type="HBoxContainer" parent="VBox/TabContainer/Players"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="KickBtn" type="Button" parent="VBox/TabContainer/Players/PlayerActions"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Kick"
|
||||
|
||||
[node name="BanBtn" type="Button" parent="VBox/TabContainer/Players/PlayerActions"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Ban"
|
||||
|
||||
[node name="MuteBtn" type="Button" parent="VBox/TabContainer/Players/PlayerActions"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Mute"
|
||||
@@ -66,6 +73,7 @@ text = "Mute"
|
||||
[node name="Server" type="VBoxContainer" parent="VBox/TabContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
metadata/_tab_index = 1
|
||||
|
||||
[node name="StatsGrid" type="GridContainer" parent="VBox/TabContainer/Server"]
|
||||
@@ -79,6 +87,7 @@ text = "Connected Players:"
|
||||
[node name="PlayerCount" type="Label" parent="VBox/TabContainer/Server/StatsGrid"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
text = "0"
|
||||
|
||||
[node name="Label2" type="Label" parent="VBox/TabContainer/Server/StatsGrid"]
|
||||
@@ -88,6 +97,7 @@ text = "Match ID:"
|
||||
[node name="MatchIdLabel" type="Label" parent="VBox/TabContainer/Server/StatsGrid"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
|
||||
text = "N/A"
|
||||
|
||||
[node name="Label3" type="Label" parent="VBox/TabContainer/Server/StatsGrid"]
|
||||
@@ -97,35 +107,40 @@ text = "Server Status:"
|
||||
[node name="ServerStatus" type="Label" parent="VBox/TabContainer/Server/StatsGrid"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0, 1, 0.5, 1)
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
text = "Running"
|
||||
|
||||
[node name="ServerActions" type="VBoxContainer" parent="VBox/TabContainer/Server"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="EndMatchBtn" type="Button" parent="VBox/TabContainer/Server/ServerActions"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
text = "End Match"
|
||||
|
||||
[node name="RestartMatchBtn" type="Button" parent="VBox/TabContainer/Server/ServerActions"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
text = "Restart Match"
|
||||
|
||||
[node name="Bans" type="VBoxContainer" parent="VBox/TabContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
metadata/_tab_index = 2
|
||||
|
||||
[node name="BanList" type="ItemList" parent="VBox/TabContainer/Bans"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 180)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
custom_minimum_size = Vector2(0, 150)
|
||||
|
||||
[node name="UnbanBtn" type="Button" parent="VBox/TabContainer/Bans"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
text = "Unban Selected"
|
||||
|
||||
|
||||
+45
-36
@@ -1,12 +1,16 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://login_screen"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://b00eef4tqt2ri"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/ui/login_screen.gd" id="1"]
|
||||
[ext_resource type="Script" uid="uid://b1lcy1ikdkknq" path="res://scripts/ui/login_screen.gd" id="1"]
|
||||
[ext_resource type="Theme" uid="uid://da337sh5qxi0s" path="res://assets/themes/ui_theme.tres" id="2"]
|
||||
|
||||
[node name="LoginScreen" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("2")
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="Background" type="ColorRect" parent="."]
|
||||
@@ -14,17 +18,21 @@ layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
color = Color(0.039, 0.039, 0.102, 1)
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.12, 0.1, 0.08, 1)
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="MainPanel" type="PanelContainer" parent="CenterContainer"]
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(400, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBox" type="VBoxContainer" parent="CenterContainer/MainPanel"]
|
||||
layout_mode = 2
|
||||
@@ -32,49 +40,49 @@ theme_override_constants/separation = 16
|
||||
|
||||
[node name="LogoLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0, 0.831, 1, 1)
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 48
|
||||
text = "TEKTON"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="SubtitleLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
||||
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
|
||||
theme_override_font_sizes/font_size = 14
|
||||
text = "Tactical Multiplayer"
|
||||
text = "Armageddon"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Spacer1" type="Control" parent="CenterContainer/MainPanel/VBox"]
|
||||
custom_minimum_size = Vector2(0, 16)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 20)
|
||||
|
||||
[node name="GuestButton" type="Button" parent="CenterContainer/MainPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 52)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 50)
|
||||
theme_override_font_sizes/font_size = 18
|
||||
text = "▶ PLAY AS GUEST"
|
||||
|
||||
[node name="Spacer2" type="Control" parent="CenterContainer/MainPanel/VBox"]
|
||||
custom_minimum_size = Vector2(0, 8)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 10)
|
||||
|
||||
[node name="OrLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.4, 0.4, 0.5, 1)
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
text = "─────── or sign in ───────"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="EmailInput" type="LineEdit" parent="CenterContainer/MainPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
placeholder_text = "Email"
|
||||
|
||||
[node name="PasswordInput" type="LineEdit" parent="CenterContainer/MainPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
placeholder_text = "Password"
|
||||
secret = true
|
||||
|
||||
@@ -86,46 +94,46 @@ text = "Remember me"
|
||||
|
||||
[node name="LoginButton" type="Button" parent="CenterContainer/MainPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 48)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 45)
|
||||
text = "Sign In"
|
||||
|
||||
[node name="RegisterLink" type="LinkButton" parent="CenterContainer/MainPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Don't have an account? Register"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Spacer3" type="Control" parent="CenterContainer/MainPanel/VBox"]
|
||||
custom_minimum_size = Vector2(0, 8)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 10)
|
||||
|
||||
[node name="SocialLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.4, 0.4, 0.5, 1)
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
text = "─────── or continue with ───────"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="SocialButtons" type="HBoxContainer" parent="CenterContainer/MainPanel/VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 12
|
||||
alignment = 1
|
||||
|
||||
[node name="GoogleButton" type="Button" parent="CenterContainer/MainPanel/VBox/SocialButtons"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(100, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(100, 40)
|
||||
text = "Google"
|
||||
|
||||
[node name="AppleButton" type="Button" parent="CenterContainer/MainPanel/VBox/SocialButtons"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(100, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(100, 40)
|
||||
text = "Apple"
|
||||
|
||||
[node name="FacebookButton" type="Button" parent="CenterContainer/MainPanel/VBox/SocialButtons"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(100, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(100, 40)
|
||||
text = "Facebook"
|
||||
|
||||
[node name="StatusLabel" type="Label" parent="CenterContainer/MainPanel/VBox"]
|
||||
@@ -138,15 +146,15 @@ autowrap_mode = 2
|
||||
[node name="LoadingSpinner" type="TextureProgressBar" parent="CenterContainer/MainPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(40, 40)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="RegistrationPanel" type="PanelContainer" parent="CenterContainer"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(400, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBox" type="VBoxContainer" parent="CenterContainer/RegistrationPanel"]
|
||||
layout_mode = 2
|
||||
@@ -154,63 +162,62 @@ theme_override_constants/separation = 12
|
||||
|
||||
[node name="Title" type="Label" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0, 0.831, 1, 1)
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "Create Account"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="RegEmailInput" type="LineEdit" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
placeholder_text = "Email"
|
||||
|
||||
[node name="RegUsernameInput" type="LineEdit" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
placeholder_text = "Username"
|
||||
|
||||
[node name="RegPasswordInput" type="LineEdit" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
placeholder_text = "Password"
|
||||
secret = true
|
||||
|
||||
[node name="RegConfirmPasswordInput" type="LineEdit" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
placeholder_text = "Confirm Password"
|
||||
secret = true
|
||||
|
||||
[node name="PasswordStrength" type="ProgressBar" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 12)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 8)
|
||||
max_value = 4.0
|
||||
show_percentage = false
|
||||
|
||||
[node name="PasswordHint" type="Label" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
theme_override_font_sizes/font_size = 11
|
||||
text = "Min 8 characters, include number and symbol"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="RegisterButton" type="Button" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 48)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 45)
|
||||
text = "Create Account"
|
||||
|
||||
[node name="BackToLoginLink" type="LinkButton" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Already have an account? Sign In"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="RegStatusLabel" type="Label" parent="CenterContainer/RegistrationPanel/VBox"]
|
||||
unique_name_in_owner = true
|
||||
@@ -226,11 +233,13 @@ anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -100.0
|
||||
offset_top = -25.0
|
||||
offset_right = -10.0
|
||||
offset_bottom = -10.0
|
||||
theme_override_colors/font_color = Color(0.3, 0.3, 0.4, 1)
|
||||
offset_left = -120.0
|
||||
offset_top = -40.0
|
||||
offset_right = -16.0
|
||||
offset_bottom = -16.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 0.6)
|
||||
theme_override_font_sizes/font_size = 11
|
||||
text = "v1.0.0"
|
||||
horizontal_alignment = 2
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://profile_panel"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dyx0upokhsh2e"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/ui/profile_panel.gd" id="1"]
|
||||
[ext_resource type="Script" uid="uid://y6wswtalyiho" path="res://scripts/ui/profile_panel.gd" id="1"]
|
||||
[ext_resource type="Theme" uid="uid://da337sh5qxi0s" path="res://assets/themes/ui_theme.tres" id="2"]
|
||||
|
||||
[node name="ProfilePanel" type="PanelContainer"]
|
||||
anchors_preset = 0
|
||||
offset_right = 350.0
|
||||
offset_bottom = 400.0
|
||||
offset_right = 380.0
|
||||
offset_bottom = 480.0
|
||||
theme = ExtResource("2")
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="VBox" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 12
|
||||
theme_override_constants/separation = 14
|
||||
|
||||
[node name="Header" type="HBoxContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
@@ -18,55 +19,61 @@ layout_mode = 2
|
||||
[node name="Title" type="Label" parent="VBox/Header"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_colors/font_color = Color(0, 0.831, 1, 1)
|
||||
theme_override_font_sizes/font_size = 20
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 22
|
||||
text = "Profile"
|
||||
|
||||
[node name="CloseButton" type="Button" parent="VBox/Header"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(36, 36)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(30, 30)
|
||||
text = "✕"
|
||||
|
||||
[node name="AvatarSection" type="HBoxContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 16
|
||||
alignment = 1
|
||||
|
||||
[node name="AvatarDisplay" type="TextureRect" parent="VBox/AvatarSection"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(88, 88)
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(80, 80)
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="AvatarButtons" type="VBoxContainer" parent="VBox/AvatarSection"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="ChangeAvatarBtn" type="Button" parent="VBox/AvatarSection/AvatarButtons"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
text = "Change Avatar"
|
||||
|
||||
[node name="DisplayNameSection" type="VBoxContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="Label" type="Label" parent="VBox/DisplayNameSection"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
text = "Display Name"
|
||||
|
||||
[node name="HBox" type="HBoxContainer" parent="VBox/DisplayNameSection"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="DisplayNameInput" type="LineEdit" parent="VBox/DisplayNameSection/HBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
custom_minimum_size = Vector2(0, 35)
|
||||
max_length = 50
|
||||
|
||||
[node name="SaveNameBtn" type="Button" parent="VBox/DisplayNameSection/HBox"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(80, 44)
|
||||
layout_mode = 2
|
||||
text = "Save"
|
||||
|
||||
@@ -75,10 +82,12 @@ layout_mode = 2
|
||||
|
||||
[node name="StatsSection" type="VBoxContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 6
|
||||
|
||||
[node name="StatsTitle" type="Label" parent="VBox/StatsSection"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0, 0.831, 1, 1)
|
||||
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "Statistics"
|
||||
|
||||
[node name="GamesPlayed" type="Label" parent="VBox/StatsSection"]
|
||||
@@ -101,20 +110,23 @@ layout_mode = 2
|
||||
|
||||
[node name="AccountSection" type="VBoxContainer" parent="VBox"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="AccountType" type="Label" parent="VBox/AccountSection"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.533, 0.533, 0.6, 1)
|
||||
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
|
||||
text = "Account: Guest"
|
||||
|
||||
[node name="LinkAccountBtn" type="Button" parent="VBox/AccountSection"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
text = "Link Email (Keep Progress)"
|
||||
|
||||
[node name="LogoutBtn" type="Button" parent="VBox/AccountSection"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 44)
|
||||
layout_mode = 2
|
||||
text = "Logout"
|
||||
|
||||
@@ -127,12 +139,12 @@ horizontal_alignment = 1
|
||||
[node name="AvatarSelectionPopup" type="PopupPanel" parent="."]
|
||||
unique_name_in_owner = true
|
||||
title = "Select Avatar"
|
||||
size = Vector2i(300, 200)
|
||||
size = Vector2i(320, 220)
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="AvatarSelectionPopup"]
|
||||
unique_name_in_owner = true
|
||||
offset_left = 10.0
|
||||
offset_top = 10.0
|
||||
offset_right = 290.0
|
||||
offset_bottom = 190.0
|
||||
offset_left = 4.0
|
||||
offset_top = 4.0
|
||||
offset_right = 316.0
|
||||
offset_bottom = 216.0
|
||||
columns = 3
|
||||
|
||||
Reference in New Issue
Block a user