update fonts and some gui

This commit is contained in:
2026-02-08 18:21:01 +08:00
parent 263af68596
commit 94efea7d38
10 changed files with 223 additions and 104 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
{
"godotTools.editorPath.godot4": "C:\\Users\\Dev-Danchie\\Godot\\Editors\\.editor_config\\tekton-local\\Godot_v4.6-stable_win64.exe",
"godotTools.editorPath.godot4": "c:\\Users\\beng\\Godot\\Editors\\4.6-stable\\Godot_v4.6-stable_win64.exe",
"editor.tabSize": 4,
"editor.insertSpaces": false,
"files.eol": "\n",
Binary file not shown.
+36
View File
@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://xnjx058n4tsw"
path="res://.godot/imported/Nougat-ExtraBlack.ttf-39914d17926b2b10a4a7227ad33c0e3b.fontdata"
[deps]
source_file="res://assets/fonts/Nougat-ExtraBlack.ttf"
dest_files=["res://.godot/imported/Nougat-ExtraBlack.ttf-39914d17926b2b10a4a7227ad33c0e3b.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}
+7
View File
@@ -46,6 +46,13 @@ window/stretch/mode="viewport"
enabled=PackedStringArray("res://addons/enhanced_gridmap/plugin.cfg", "res://addons/com.heroiclabs.nakama/plugin.cfg")
[file_customization]
folder_colors={
"res://assets/": "purple",
"res://scenes/": "green"
}
[input]
grab_item={
+15 -39
View File
@@ -38,6 +38,8 @@ extends Control
@onready var random_spawn_label = $LobbyPanel/TopBar/SettingsSection/RandomSpawnLabel
@onready var enable_timer_check = $LobbyPanel/TopBar/SettingsSection/EnableTimerCheck
@onready var enable_timer_label = $LobbyPanel/TopBar/SettingsSection/EnableTimerLabel
@onready var scarcity_option = $LobbyPanel/TopBar/SettingsSection/ScarcityOption
@onready var scarcity_label = $LobbyPanel/TopBar/SettingsSection/ScarcityLabel
# UI References - Player Slots
@onready var players_container = $LobbyPanel/PlayersContainer
@@ -69,10 +71,6 @@ var admin_panel_instance: Control
# Store current match ID for copy function
var current_match_id: String = ""
# Scarcity Controls (Injected via code since we can't edit scene)
var scarcity_option: OptionButton
var scarcity_label: Label
# Server Selection Controls (Now in tscn)
# var server_option: OptionButton
# var server_ip_input: LineEdit
@@ -85,9 +83,6 @@ func _ready():
# Load character textures
_load_character_textures()
# Inject Scarcity UI
call_deferred("_setup_scarcity_ui")
# Server config UI is now in tscn
# Get player slot references
@@ -147,6 +142,9 @@ func _ready():
ready_btn.toggled.connect(_on_ready_toggled)
start_game_btn.pressed.connect(_on_start_game_pressed)
if scarcity_option:
scarcity_option.item_selected.connect(_on_scarcity_selected)
# Connect LobbyManager signals
LobbyManager.room_list_updated.connect(_on_room_list_updated)
LobbyManager.room_joined.connect(_on_room_joined)
@@ -176,10 +174,16 @@ func _ready():
# =============================================================================
func _load_character_textures() -> void:
"""Load character expression textures for preview."""
var characters = ["Bob", "Gatot", "Masbro", "Oldpop"]
"""Load character preview textures."""
var characters = {
"Copper": "res://assets/graphics/character_selection/sc_characters/sc_copper.png",
"Dabro": "res://assets/graphics/character_selection/sc_characters/sc_dabro.png",
"Gatot": "res://assets/graphics/character_selection/sc_characters/sc_gatot.png",
"Pip": "res://assets/graphics/character_selection/sc_characters/sc_pip.png",
"Random": "res://assets/graphics/character_selection/sc_characters/sc_unknown.png"
}
for char_name in characters:
var tex_path = "res://assets/characters/%s_%s-expression.png" % [char_name, char_name.to_lower()]
var tex_path = characters[char_name]
if ResourceLoader.exists(tex_path):
character_textures[char_name] = load(tex_path)
else:
@@ -199,33 +203,6 @@ func _on_server_ip_submitted(new_text: String) -> void:
if server_option and server_option.selected == 1:
NakamaManager.set_server(new_text.strip_edges())
func _setup_scarcity_ui() -> void:
"""Inject scarcity controls into SettingsSection."""
if not duration_option: return
var settings_section = duration_option.get_parent()
if not settings_section: return
# Create OptionButton for Host
scarcity_option = OptionButton.new()
scarcity_option.add_item("Normal") # ID 0
scarcity_option.add_item("Aggressive") # ID 1
scarcity_option.add_item("Chaos") # ID 2
scarcity_option.selected = 0
scarcity_option.tooltip_text = "Select Scarcity Mode"
scarcity_option.name = "ScarcityOption"
scarcity_option.item_selected.connect(_on_scarcity_selected)
# Create Label for Clients
scarcity_label = Label.new()
scarcity_label.text = "Normal"
scarcity_label.name = "ScarcityLabel"
# Copy style from duration_text_label if possible, usually fine default
# Add to scene
settings_section.add_child(scarcity_option)
settings_section.add_child(scarcity_label)
func _setup_player_slots() -> void:
"""Get references to all player slot nodes."""
player_slots.clear()
@@ -418,7 +395,6 @@ func _on_room_list_updated(rooms: Array) -> void:
func _on_room_joined(room_data: Dictionary) -> void:
_show_panel("lobby")
current_match_id = room_data.get("match_id", "")
room_name_header.text = "ROOM: %s" % room_data.get("room_name", "Unknown")
match_id_display.text = "ID: %s" % _truncate_id(current_match_id)
# Configure host-specific UI
@@ -579,7 +555,7 @@ func _update_player_slots() -> void:
# Use a character for bot preview
var char_preview = slot.get_node_or_null("CharacterPreview%d" % slot_num)
var bot_characters = ["Bob", "Gatot", "Masbro", "Oldpop"]
var bot_characters = ["Copper", "Dabro", "Gatot", "Pip"]
var bot_char = bot_characters[(i) % bot_characters.size()]
if char_preview and character_textures.has(bot_char):
char_preview.texture = character_textures[bot_char]
+62 -21
View File
@@ -4,6 +4,7 @@
[ext_resource type="Theme" uid="uid://da337sh5qxi0s" path="res://assets/themes/ui_theme.tres" id="2_theme"]
[ext_resource type="Texture2D" uid="uid://2d1ks5pmblc7" path="res://assets/graphics/main_menu/bg_back.png" id="3_q60fs"]
[ext_resource type="Texture2D" uid="uid://dvp0as6yyudco" path="res://assets/graphics/main_menu/bg_illust.png" id="4_nqcc7"]
[ext_resource type="FontFile" uid="uid://xnjx058n4tsw" path="res://assets/fonts/Nougat-ExtraBlack.ttf" id="5_pc087"]
[node name="Lobby" type="Control" unique_id=1490767889]
layout_mode = 3
@@ -275,12 +276,14 @@ theme_override_constants/separation = 10
[node name="ProfileBtn" type="Button" parent="LobbyPanel/TopBar/ProfileSection" unique_id=1726139031]
custom_minimum_size = Vector2(80, 32)
layout_mode = 2
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 11
text = "Profile"
[node name="LogoutBtn" type="Button" parent="LobbyPanel/TopBar/ProfileSection" unique_id=1221873519]
custom_minimum_size = Vector2(70, 32)
layout_mode = 2
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 11
text = "Logout"
@@ -295,12 +298,14 @@ theme_override_constants/separation = 8
[node name="MatchIdDisplay" type="Label" parent="LobbyPanel/TopBar/MatchIdContainer" unique_id=1918774593]
layout_mode = 2
theme_override_colors/font_color = Color(0.955211, 0.955297, 0.962624, 1)
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 10
text = "Match ID: "
[node name="CopyIdBtn" type="Button" parent="LobbyPanel/TopBar/MatchIdContainer" unique_id=1663928449]
custom_minimum_size = Vector2(60, 28)
layout_mode = 2
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 10
text = "COPY"
@@ -315,12 +320,14 @@ theme_override_constants/separation = 8
[node name="DurationLabel" type="Label" parent="LobbyPanel/TopBar/SettingsSection" unique_id=1072635610]
layout_mode = 2
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 11
text = "Duration:"
[node name="DurationOption" type="OptionButton" parent="LobbyPanel/TopBar/SettingsSection" unique_id=448675775]
custom_minimum_size = Vector2(90, 28)
layout_mode = 2
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 11
selected = 2
item_count = 5
@@ -348,6 +355,7 @@ layout_mode = 2
[node name="RandomSpawnCheck" type="CheckButton" parent="LobbyPanel/TopBar/SettingsSection" unique_id=1259096465]
layout_mode = 2
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 11
button_pressed = true
text = "Random Spawn"
@@ -365,6 +373,7 @@ layout_mode = 2
[node name="EnableTimerCheck" type="CheckButton" parent="LobbyPanel/TopBar/SettingsSection" unique_id=417182829]
layout_mode = 2
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 11
button_pressed = true
text = "Enable Timer"
@@ -390,7 +399,8 @@ grow_horizontal = 2
[node name="HostBannerLabel" type="Label" parent="LobbyPanel/HostBanner" unique_id=1011182924]
layout_mode = 2
theme_override_colors/font_color = Color(0.1, 0.1, 0.1, 1)
theme_override_font_sizes/font_size = 20
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 22
text = "HOST"
horizontal_alignment = 1
vertical_alignment = 1
@@ -435,7 +445,8 @@ alignment = 1
[node name="PlayerName1" type="Label" parent="LobbyPanel/PlayersContainer/PlayerSlot1" unique_id=19773465]
layout_mode = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_font_sizes/font_size = 16
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 18
text = "Player 1"
horizontal_alignment = 1
@@ -460,6 +471,7 @@ text = "◀"
custom_minimum_size = Vector2(80, 0)
layout_mode = 2
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "Bob"
horizontal_alignment = 1
@@ -475,6 +487,7 @@ text = "▶"
custom_minimum_size = Vector2(80, 0)
layout_mode = 2
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "Bob"
horizontal_alignment = 1
@@ -482,7 +495,8 @@ horizontal_alignment = 1
[node name="ReadyStatus1" type="Label" parent="LobbyPanel/PlayersContainer/PlayerSlot1" unique_id=1382214476]
layout_mode = 2
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 1)
theme_override_font_sizes/font_size = 12
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "NOT READY"
horizontal_alignment = 1
@@ -495,7 +509,8 @@ alignment = 1
[node name="PlayerName2" type="Label" parent="LobbyPanel/PlayersContainer/PlayerSlot2" unique_id=878869724]
layout_mode = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_font_sizes/font_size = 16
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 18
text = "Player 2"
horizontal_alignment = 1
@@ -536,6 +551,7 @@ text = "▶"
custom_minimum_size = Vector2(80, 0)
layout_mode = 2
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "Bob"
horizontal_alignment = 1
@@ -543,7 +559,8 @@ horizontal_alignment = 1
[node name="ReadyStatus2" type="Label" parent="LobbyPanel/PlayersContainer/PlayerSlot2" unique_id=1248116760]
layout_mode = 2
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 1)
theme_override_font_sizes/font_size = 12
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "NOT READY"
horizontal_alignment = 1
@@ -556,7 +573,8 @@ alignment = 1
[node name="PlayerName3" type="Label" parent="LobbyPanel/PlayersContainer/PlayerSlot3" unique_id=1647715021]
layout_mode = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_font_sizes/font_size = 16
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 18
text = "Player 3"
horizontal_alignment = 1
@@ -597,6 +615,7 @@ text = "▶"
custom_minimum_size = Vector2(80, 0)
layout_mode = 2
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "Bob"
horizontal_alignment = 1
@@ -604,7 +623,8 @@ horizontal_alignment = 1
[node name="ReadyStatus3" type="Label" parent="LobbyPanel/PlayersContainer/PlayerSlot3" unique_id=822843162]
layout_mode = 2
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 1)
theme_override_font_sizes/font_size = 12
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "NOT READY"
horizontal_alignment = 1
@@ -617,7 +637,8 @@ alignment = 1
[node name="PlayerName4" type="Label" parent="LobbyPanel/PlayersContainer/PlayerSlot4" unique_id=601920855]
layout_mode = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_font_sizes/font_size = 16
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 18
text = "Player 4"
horizontal_alignment = 1
@@ -658,6 +679,7 @@ text = "▶"
custom_minimum_size = Vector2(80, 0)
layout_mode = 2
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "Bob"
horizontal_alignment = 1
@@ -665,7 +687,8 @@ horizontal_alignment = 1
[node name="ReadyStatus4" type="Label" parent="LobbyPanel/PlayersContainer/PlayerSlot4" unique_id=1335401655]
layout_mode = 2
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 1)
theme_override_font_sizes/font_size = 12
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "NOT READY"
horizontal_alignment = 1
@@ -692,7 +715,8 @@ alignment = 1
[node name="PlayerName5" type="Label" parent="LobbyPanel/PlayersContainer2/PlayerSlot5" unique_id=1274835923]
layout_mode = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_font_sizes/font_size = 16
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 18
text = "Player 5"
horizontal_alignment = 1
@@ -733,6 +757,7 @@ text = "▶"
custom_minimum_size = Vector2(80, 0)
layout_mode = 2
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "Bob"
horizontal_alignment = 1
@@ -740,7 +765,8 @@ horizontal_alignment = 1
[node name="ReadyStatus5" type="Label" parent="LobbyPanel/PlayersContainer2/PlayerSlot5" unique_id=1075029896]
layout_mode = 2
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 1)
theme_override_font_sizes/font_size = 12
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "NOT READY"
horizontal_alignment = 1
@@ -753,7 +779,8 @@ alignment = 1
[node name="PlayerName6" type="Label" parent="LobbyPanel/PlayersContainer2/PlayerSlot6" unique_id=2146003972]
layout_mode = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_font_sizes/font_size = 16
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 18
text = "Player 6"
horizontal_alignment = 1
@@ -794,6 +821,7 @@ text = "▶"
custom_minimum_size = Vector2(80, 0)
layout_mode = 2
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "Bob"
horizontal_alignment = 1
@@ -801,7 +829,8 @@ horizontal_alignment = 1
[node name="ReadyStatus6" type="Label" parent="LobbyPanel/PlayersContainer2/PlayerSlot6" unique_id=1888412229]
layout_mode = 2
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 1)
theme_override_font_sizes/font_size = 12
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "NOT READY"
horizontal_alignment = 1
@@ -814,7 +843,8 @@ alignment = 1
[node name="PlayerName7" type="Label" parent="LobbyPanel/PlayersContainer2/PlayerSlot7" unique_id=705333888]
layout_mode = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_font_sizes/font_size = 16
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 18
text = "Player 4"
horizontal_alignment = 1
@@ -855,6 +885,7 @@ text = "▶"
custom_minimum_size = Vector2(80, 0)
layout_mode = 2
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "Bob"
horizontal_alignment = 1
@@ -862,7 +893,8 @@ horizontal_alignment = 1
[node name="ReadyStatus7" type="Label" parent="LobbyPanel/PlayersContainer2/PlayerSlot7" unique_id=2098796095]
layout_mode = 2
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 1)
theme_override_font_sizes/font_size = 12
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "NOT READY"
horizontal_alignment = 1
@@ -875,7 +907,8 @@ alignment = 1
[node name="PlayerName8" type="Label" parent="LobbyPanel/PlayersContainer2/PlayerSlot8" unique_id=13133480]
layout_mode = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_font_sizes/font_size = 16
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 18
text = "Player 4"
horizontal_alignment = 1
@@ -916,6 +949,7 @@ text = "▶"
custom_minimum_size = Vector2(80, 0)
layout_mode = 2
theme_override_colors/font_color = Color(0.992, 0.796, 0.047, 1)
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "Bob"
horizontal_alignment = 1
@@ -923,7 +957,8 @@ horizontal_alignment = 1
[node name="ReadyStatus8" type="Label" parent="LobbyPanel/PlayersContainer2/PlayerSlot8" unique_id=434057613]
layout_mode = 2
theme_override_colors/font_color = Color(0.6, 0.6, 0.6, 1)
theme_override_font_sizes/font_size = 12
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "NOT READY"
horizontal_alignment = 1
@@ -945,6 +980,7 @@ grow_vertical = 0
[node name="AreaLabel" type="Label" parent="LobbyPanel/AreaSelector" unique_id=1925038296]
layout_mode = 2
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 13
text = "AREA: "
@@ -958,6 +994,7 @@ text = "◀"
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 16
text = "Desert"
horizontal_alignment = 1
@@ -986,7 +1023,8 @@ theme_override_constants/separation = 20
[node name="LeaveBtn" type="Button" parent="LobbyPanel/BottomBar" unique_id=1447825960]
custom_minimum_size = Vector2(120, 44)
layout_mode = 2
theme_override_font_sizes/font_size = 14
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 18
text = "LEAVE"
[node name="Spacer" type="Control" parent="LobbyPanel/BottomBar" unique_id=1050617828]
@@ -996,14 +1034,16 @@ size_flags_horizontal = 3
[node name="ReadyBtn" type="Button" parent="LobbyPanel/BottomBar" unique_id=2026272478]
custom_minimum_size = Vector2(140, 50)
layout_mode = 2
theme_override_font_sizes/font_size = 16
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 18
toggle_mode = true
text = "READY"
[node name="StartGameBtn" type="Button" parent="LobbyPanel/BottomBar" unique_id=121485973]
custom_minimum_size = Vector2(140, 50)
layout_mode = 2
theme_override_font_sizes/font_size = 16
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 18
disabled = true
text = "MATCH"
@@ -1046,7 +1086,8 @@ grow_vertical = 0
[node name="ConnectionStatus" type="Label" parent="StatusBar" unique_id=1991909918]
layout_mode = 2
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
theme_override_font_sizes/font_size = 12
theme_override_fonts/font = ExtResource("5_pc087")
theme_override_font_sizes/font_size = 14
text = "NOT CONNECTED"
horizontal_alignment = 1
+43 -8
View File
@@ -18,6 +18,7 @@
[ext_resource type="Texture2D" uid="uid://c74sy60aew8xv" path="res://assets/textures/player_board_and_blue_print/tile_star_goals.tres" id="9_i0gbs"]
[ext_resource type="Texture2D" uid="uid://dn26fllyitnr1" path="res://assets/textures/player_board_and_blue_print/tile_coin_goals.tres" id="10_my1qp"]
[ext_resource type="Texture2D" uid="uid://xknm2v6lgxwi" path="res://assets/textures/mission_player_2.png" id="13_ahjgs"]
[ext_resource type="FontFile" uid="uid://xnjx058n4tsw" path="res://assets/fonts/Nougat-ExtraBlack.ttf" id="13_j8jky"]
[ext_resource type="Texture2D" uid="uid://cv2v4i6ipkpv1" path="res://assets/textures/player_board_and_blue_print/tile_null_24px.tres" id="17_hh6ui"]
[ext_resource type="Texture2D" uid="uid://butrfmdp6wsck" path="res://assets/textures/player_board_and_blue_print/tiles_null_24px.png" id="18_p3nmx"]
[ext_resource type="StyleBox" uid="uid://d3ruc8gytoovx" path="res://assets/styles/ribbon_selected_gui.tres" id="18_u5x6e"]
@@ -72,6 +73,23 @@ texture = ExtResource("13_ahjgs")
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_s1l63"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_kmb1v"]
content_margin_left = 16.0
content_margin_top = 16.0
content_margin_right = 16.0
content_margin_bottom = 16.0
bg_color = Color(0, 0, 0, 0.49803922)
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 = 36
corner_radius_top_right = 36
corner_radius_bottom_right = 36
corner_radius_bottom_left = 36
corner_detail = 12
[node name="Main" type="Node3D" unique_id=1566673391]
script = ExtResource("1_xcpe3")
@@ -1906,10 +1924,11 @@ anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = 261.0
offset_top = -113.0
offset_top = -104.0
offset_right = 301.0
offset_bottom = -68.0
grow_vertical = 2
theme_override_fonts/font = ExtResource("13_j8jky")
theme_override_font_sizes/font_size = 32
text = "X0"
@@ -1956,6 +1975,7 @@ offset_bottom = 333.0
[node name="TimerLabel" type="Label" parent="GoalsTimer" unique_id=466345203]
layout_mode = 2
theme_override_fonts/font = ExtResource("13_j8jky")
theme_override_font_sizes/font_size = 14
text = "00"
horizontal_alignment = 1
@@ -10403,10 +10423,10 @@ theme_override_constants/separation = 4
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -211.0
offset_left = -187.0
offset_top = 15.0
offset_right = -18.0
offset_bottom = 166.0
offset_right = -15.0
offset_bottom = 142.0
grow_horizontal = 0
size_flags_horizontal = 3
size_flags_vertical = 3
@@ -10424,6 +10444,7 @@ theme_override_constants/separation = 4
[node name="Title" type="Label" parent="LeaderboardPanel/MarginContainer/VBox" unique_id=1810699363]
layout_mode = 2
theme_override_fonts/font = ExtResource("13_j8jky")
theme_override_font_sizes/font_size = 16
text = "🏆 LEADERBOARD"
horizontal_alignment = 1
@@ -10437,12 +10458,14 @@ layout_mode = 2
[node name="RankLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry1" unique_id=828754165]
custom_minimum_size = Vector2(35, 0)
layout_mode = 2
theme_override_fonts/font = ExtResource("13_j8jky")
theme_override_font_sizes/font_size = 14
text = "1st"
[node name="NameLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry1" unique_id=777741978]
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
theme_override_fonts/font = ExtResource("13_j8jky")
theme_override_font_sizes/font_size = 14
text = "Player 1"
clip_text = true
@@ -10450,6 +10473,7 @@ clip_text = true
[node name="ScoreLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry1" unique_id=163441394]
layout_mode = 2
size_flags_horizontal = 3
theme_override_fonts/font = ExtResource("13_j8jky")
theme_override_font_sizes/font_size = 14
text = "0"
horizontal_alignment = 2
@@ -10460,12 +10484,14 @@ layout_mode = 2
[node name="RankLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry2" unique_id=276085006]
custom_minimum_size = Vector2(35, 0)
layout_mode = 2
theme_override_fonts/font = ExtResource("13_j8jky")
theme_override_font_sizes/font_size = 14
text = "2nd"
[node name="NameLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry2" unique_id=980063105]
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
theme_override_fonts/font = ExtResource("13_j8jky")
theme_override_font_sizes/font_size = 14
text = "Player 2"
clip_text = true
@@ -10473,6 +10499,7 @@ clip_text = true
[node name="ScoreLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry2" unique_id=630589738]
layout_mode = 2
size_flags_horizontal = 3
theme_override_fonts/font = ExtResource("13_j8jky")
theme_override_font_sizes/font_size = 14
text = "0"
horizontal_alignment = 2
@@ -10483,12 +10510,14 @@ layout_mode = 2
[node name="RankLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry3" unique_id=940102589]
custom_minimum_size = Vector2(35, 0)
layout_mode = 2
theme_override_fonts/font = ExtResource("13_j8jky")
theme_override_font_sizes/font_size = 14
text = "3rd"
[node name="NameLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry3" unique_id=872999463]
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
theme_override_fonts/font = ExtResource("13_j8jky")
theme_override_font_sizes/font_size = 14
text = "Player 3"
clip_text = true
@@ -10496,6 +10525,7 @@ clip_text = true
[node name="ScoreLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry3" unique_id=508325054]
layout_mode = 2
size_flags_horizontal = 3
theme_override_fonts/font = ExtResource("13_j8jky")
theme_override_font_sizes/font_size = 14
text = "0"
horizontal_alignment = 2
@@ -10506,12 +10536,14 @@ layout_mode = 2
[node name="RankLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry4" unique_id=539805932]
custom_minimum_size = Vector2(35, 0)
layout_mode = 2
theme_override_fonts/font = ExtResource("13_j8jky")
theme_override_font_sizes/font_size = 14
text = "4th"
[node name="NameLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry4" unique_id=379355680]
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
theme_override_fonts/font = ExtResource("13_j8jky")
theme_override_font_sizes/font_size = 14
text = "Player 4"
clip_text = true
@@ -10519,6 +10551,7 @@ clip_text = true
[node name="ScoreLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry4" unique_id=560418594]
layout_mode = 2
size_flags_horizontal = 3
theme_override_fonts/font = ExtResource("13_j8jky")
theme_override_font_sizes/font_size = 14
text = "0"
horizontal_alignment = 2
@@ -10527,11 +10560,12 @@ horizontal_alignment = 2
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -75.0
offset_top = 18.0
offset_right = 85.0
offset_bottom = 68.0
offset_left = -74.0
offset_top = 21.0
offset_right = 74.0
offset_bottom = 92.0
grow_horizontal = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_kmb1v")
[node name="VBox" type="VBoxContainer" parent="GlobalMatchTimer" unique_id=24429117]
layout_mode = 2
@@ -10539,6 +10573,7 @@ alignment = 1
[node name="TimerLabel" type="Label" parent="GlobalMatchTimer/VBox" unique_id=689385799]
layout_mode = 2
theme_override_fonts/font = ExtResource("13_j8jky")
theme_override_font_sizes/font_size = 28
text = "3:00"
horizontal_alignment = 1
+3 -2
View File
@@ -9,6 +9,7 @@
[ext_resource type="AnimationLibrary" uid="uid://c3pyopnwibckj" path="res://assets/characters/animations/animation-pack.res" id="6_5oq5w"]
[ext_resource type="Script" uid="uid://cwwwixc07jc86" path="res://scripts/bot_controller.gd" id="7_botctrl"]
[ext_resource type="Texture2D" uid="uid://y4l3c6305ier" path="res://assets/models/character_pointer/character_pointer_Char Pointer_color.png" id="7_ur7pv"]
[ext_resource type="FontFile" uid="uid://xnjx058n4tsw" path="res://assets/fonts/Nougat-ExtraBlack.ttf" id="8_y4r1p"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_83jal"]
resource_name = "Material.001"
@@ -102,7 +103,7 @@ shape = SubResource("SphereShape3D_3oo5r")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.0281162, 0)
billboard = 1
text = "username"
font = SubResource("FontVariation_q2tkp")
font = ExtResource("8_y4r1p")
font_size = 48
outline_size = 26
uppercase = true
@@ -113,7 +114,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.83275956, 1.5372815, 0)
billboard = 1
modulate = Color(0.32, 0.614667, 1, 1)
text = "1st"
font = SubResource("FontVariation_q2tkp")
font = ExtResource("8_y4r1p")
font_size = 62
outline_size = 26
autowrap_mode = 2
+47 -31
View File
@@ -1,147 +1,163 @@
[gd_scene load_steps=3 format=3 uid="uid://dyx0upokhsh2e"]
[gd_scene format=3 uid="uid://dyx0upokhsh2e"]
[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"]
[ext_resource type="FontFile" uid="uid://xnjx058n4tsw" path="res://assets/fonts/Nougat-ExtraBlack.ttf" id="3_e13i6"]
[node name="ProfilePanel" type="PanelContainer"]
[node name="ProfilePanel" type="PanelContainer" unique_id=229091481]
offset_right = 380.0
offset_bottom = 480.0
theme = ExtResource("2")
script = ExtResource("1")
[node name="VBox" type="VBoxContainer" parent="."]
[node name="VBox" type="VBoxContainer" parent="." unique_id=953819957]
layout_mode = 2
theme_override_constants/separation = 14
[node name="Header" type="HBoxContainer" parent="VBox"]
[node name="Header" type="HBoxContainer" parent="VBox" unique_id=485959454]
layout_mode = 2
[node name="Title" type="Label" parent="VBox/Header"]
[node name="Title" type="Label" parent="VBox/Header" unique_id=19242315]
layout_mode = 2
size_flags_horizontal = 3
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
theme_override_colors/font_color = Color(0.41568628, 0.6392157, 0.14117648, 1)
theme_override_fonts/font = ExtResource("3_e13i6")
theme_override_font_sizes/font_size = 22
text = "Profile"
[node name="CloseButton" type="Button" parent="VBox/Header"]
[node name="CloseButton" type="Button" parent="VBox/Header" unique_id=448699205]
unique_name_in_owner = true
custom_minimum_size = Vector2(36, 36)
layout_mode = 2
text = "✕"
[node name="AvatarSection" type="HBoxContainer" parent="VBox"]
[node name="AvatarSection" type="HBoxContainer" parent="VBox" unique_id=501593330]
layout_mode = 2
theme_override_constants/separation = 16
alignment = 1
[node name="AvatarDisplay" type="TextureRect" parent="VBox/AvatarSection"]
[node name="AvatarDisplay" type="TextureRect" parent="VBox/AvatarSection" unique_id=173716070]
unique_name_in_owner = true
custom_minimum_size = Vector2(88, 88)
layout_mode = 2
expand_mode = 1
stretch_mode = 5
[node name="AvatarButtons" type="VBoxContainer" parent="VBox/AvatarSection"]
[node name="AvatarButtons" type="VBoxContainer" parent="VBox/AvatarSection" unique_id=1408685281]
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_id=1502182238]
unique_name_in_owner = true
custom_minimum_size = Vector2(0, 44)
layout_mode = 2
theme_override_fonts/font = ExtResource("3_e13i6")
text = "Change Avatar"
[node name="DisplayNameSection" type="VBoxContainer" parent="VBox"]
[node name="DisplayNameSection" type="VBoxContainer" parent="VBox" unique_id=545753874]
layout_mode = 2
theme_override_constants/separation = 8
[node name="Label" type="Label" parent="VBox/DisplayNameSection"]
[node name="Label" type="Label" parent="VBox/DisplayNameSection" unique_id=1868331382]
layout_mode = 2
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
theme_override_fonts/font = ExtResource("3_e13i6")
text = "Display Name"
[node name="HBox" type="HBoxContainer" parent="VBox/DisplayNameSection"]
[node name="HBox" type="HBoxContainer" parent="VBox/DisplayNameSection" unique_id=1124739186]
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_id=527983746]
unique_name_in_owner = true
custom_minimum_size = Vector2(0, 44)
layout_mode = 2
size_flags_horizontal = 3
theme_override_fonts/font = ExtResource("3_e13i6")
max_length = 50
[node name="SaveNameBtn" type="Button" parent="VBox/DisplayNameSection/HBox"]
[node name="SaveNameBtn" type="Button" parent="VBox/DisplayNameSection/HBox" unique_id=843919725]
unique_name_in_owner = true
custom_minimum_size = Vector2(80, 44)
layout_mode = 2
theme_override_fonts/font = ExtResource("3_e13i6")
text = "Save"
[node name="Separator1" type="HSeparator" parent="VBox"]
[node name="Separator1" type="HSeparator" parent="VBox" unique_id=1702408710]
layout_mode = 2
[node name="StatsSection" type="VBoxContainer" parent="VBox"]
[node name="StatsSection" type="VBoxContainer" parent="VBox" unique_id=1972383442]
layout_mode = 2
theme_override_constants/separation = 6
[node name="StatsTitle" type="Label" parent="VBox/StatsSection"]
[node name="StatsTitle" type="Label" parent="VBox/StatsSection" unique_id=1851168520]
layout_mode = 2
theme_override_colors/font_color = Color(0.647, 0.996, 0.224, 1)
theme_override_colors/font_color = Color(0.41536003, 0.64, 0.14080001, 1)
theme_override_fonts/font = ExtResource("3_e13i6")
theme_override_font_sizes/font_size = 16
text = "Statistics"
[node name="GamesPlayed" type="Label" parent="VBox/StatsSection"]
[node name="GamesPlayed" type="Label" parent="VBox/StatsSection" unique_id=1727349753]
unique_name_in_owner = true
layout_mode = 2
theme_override_colors/font_color = Color(0.57, 0.32090998, 0.1767, 1)
theme_override_fonts/font = ExtResource("3_e13i6")
text = "Games Played: 0"
[node name="WinRate" type="Label" parent="VBox/StatsSection"]
[node name="WinRate" type="Label" parent="VBox/StatsSection" unique_id=1229711691]
unique_name_in_owner = true
layout_mode = 2
theme_override_colors/font_color = Color(0.57, 0.32090998, 0.1767, 1)
theme_override_fonts/font = ExtResource("3_e13i6")
text = "Win Rate: 0%"
[node name="HighScore" type="Label" parent="VBox/StatsSection"]
[node name="HighScore" type="Label" parent="VBox/StatsSection" unique_id=443769119]
unique_name_in_owner = true
layout_mode = 2
theme_override_colors/font_color = Color(0.57, 0.32090998, 0.1767, 1)
theme_override_fonts/font = ExtResource("3_e13i6")
text = "High Score: 0"
[node name="Separator2" type="HSeparator" parent="VBox"]
[node name="Separator2" type="HSeparator" parent="VBox" unique_id=307036203]
layout_mode = 2
[node name="AccountSection" type="VBoxContainer" parent="VBox"]
[node name="AccountSection" type="VBoxContainer" parent="VBox" unique_id=1297099357]
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_id=332392487]
unique_name_in_owner = true
layout_mode = 2
theme_override_colors/font_color = Color(0.69, 0.529, 0.357, 1)
theme_override_fonts/font = ExtResource("3_e13i6")
text = "Account: Guest"
[node name="LinkAccountBtn" type="Button" parent="VBox/AccountSection"]
[node name="LinkAccountBtn" type="Button" parent="VBox/AccountSection" unique_id=1719857784]
unique_name_in_owner = true
custom_minimum_size = Vector2(0, 44)
layout_mode = 2
theme_override_fonts/font = ExtResource("3_e13i6")
text = "Link Email (Keep Progress)"
[node name="LogoutBtn" type="Button" parent="VBox/AccountSection"]
[node name="LogoutBtn" type="Button" parent="VBox/AccountSection" unique_id=1335420017]
unique_name_in_owner = true
custom_minimum_size = Vector2(0, 44)
layout_mode = 2
theme_override_fonts/font = ExtResource("3_e13i6")
text = "Logout"
[node name="StatusLabel" type="Label" parent="VBox"]
[node name="StatusLabel" type="Label" parent="VBox" unique_id=2080837765]
unique_name_in_owner = true
layout_mode = 2
theme_override_font_sizes/font_size = 12
horizontal_alignment = 1
[node name="AvatarSelectionPopup" type="PopupPanel" parent="."]
[node name="AvatarSelectionPopup" type="PopupPanel" parent="." unique_id=14363298]
unique_name_in_owner = true
title = "Select Avatar"
size = Vector2i(320, 220)
[node name="GridContainer" type="GridContainer" parent="AvatarSelectionPopup"]
[node name="GridContainer" type="GridContainer" parent="AvatarSelectionPopup" unique_id=183560389]
unique_name_in_owner = true
offset_left = 4.0
offset_top = 4.0
+9 -2
View File
@@ -39,7 +39,7 @@ var scarcity_mode: String = "Normal" # Normal, Aggressive, Chaos
signal scarcity_mode_changed(mode: String)
# Character and area selection
var available_characters: Array[String] = ["Bob", "Gatot", "Masbro", "Oldpop"]
var available_characters: Array[String] = ["Copper", "Dabro", "Gatot", "Pip", "Random"]
var available_areas: Array[String] = ["Desert", "Forest", "City", "Factory"]
var selected_area: String = "Desert" # Host-controlled
var local_character_index: int = 0 # Local player's character index
@@ -259,6 +259,13 @@ func cycle_character(direction: int) -> void:
local_character_index = wrapi(local_character_index + direction, 0, available_characters.size())
set_character(available_characters[local_character_index])
func select_random_character() -> void:
"""Select a random character (excluding 'Randomized' option itself)."""
# Pick from indices 0-3 (Copper, Dabro, Gatot, Pip)
var random_idx = randi() % 4
local_character_index = random_idx
set_character(available_characters[local_character_index])
@rpc("any_peer", "call_local", "reliable")
func sync_character(player_id: int, character_name: String) -> void:
"""Sync character selection across all clients."""
@@ -444,5 +451,5 @@ func reset() -> void:
_all_ready = false
match_duration = 180 # Reset to default 3 minutes
selected_area = "Desert"
local_character_index = 0
local_character_index = 0 # Default to "Copper"
enable_cycle_timer = false