From 384992e935cd12538d6d91b6f10c97ccb261cb07 Mon Sep 17 00:00:00 2001 From: Rob Kelly Date: Tue, 17 Dec 2024 15:55:15 -0700 Subject: [PATCH] Character selector populates character name --- assets/text/text.csv | 2 ++ .../player_characters/gfolf_girl/debug_girl.tres | 2 +- .../deathmatch_setup/player_setup/player_setup.gd | 1 + src/ui/menus/title_screen/title_screen.tscn | 15 +++++++-------- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/assets/text/text.csv b/assets/text/text.csv index 402f45c..653d4e6 100644 --- a/assets/text/text.csv +++ b/assets/text/text.csv @@ -135,3 +135,5 @@ BALL_BEACH,"Beach Ball" BALL_POWER,Powerball , MAP_DEBUG,"Debug Island" +, +CHARACTER_DEBUG,"Debug Girl" diff --git a/src/characters/player_characters/gfolf_girl/debug_girl.tres b/src/characters/player_characters/gfolf_girl/debug_girl.tres index 3748877..732ab84 100644 --- a/src/characters/player_characters/gfolf_girl/debug_girl.tres +++ b/src/characters/player_characters/gfolf_girl/debug_girl.tres @@ -6,4 +6,4 @@ [resource] script = ExtResource("2_rx8x8") controller_scene = ExtResource("1_m8n4f") -name = "Debug Girl" +name = "CHARACTER_DEBUG" diff --git a/src/ui/menus/title_screen/deathmatch_setup/player_setup/player_setup.gd b/src/ui/menus/title_screen/deathmatch_setup/player_setup/player_setup.gd index 0e7ebfd..8725090 100644 --- a/src/ui/menus/title_screen/deathmatch_setup/player_setup/player_setup.gd +++ b/src/ui/menus/title_screen/deathmatch_setup/player_setup/player_setup.gd @@ -82,6 +82,7 @@ func _set_selected_character_index(value: int) -> void: character_container.add_child(character_controller) character_controller.set_color(player_color) + char_name.text = get_selected_character().name func get_selected_character() -> Character: diff --git a/src/ui/menus/title_screen/title_screen.tscn b/src/ui/menus/title_screen/title_screen.tscn index 6721286..aad1e05 100644 --- a/src/ui/menus/title_screen/title_screen.tscn +++ b/src/ui/menus/title_screen/title_screen.tscn @@ -1235,7 +1235,7 @@ grow_horizontal = 2 grow_vertical = 2 [node name="PressStart" type="Label" parent="Menu"] -visible = false +modulate = Color(1, 1, 1, 0.997297) layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -1253,12 +1253,11 @@ text = "TITLE_START" [node name="MainMenu" type="VBoxContainer" parent="Menu"] visible = false -modulate = Color(1, 1, 1, 0) layout_mode = 1 anchors_preset = -1 -anchor_left = -0.5 +anchor_left = 0.5 anchor_top = 0.5 -anchor_right = -0.5 +anchor_right = 0.5 anchor_bottom = 0.5 grow_horizontal = 2 grow_vertical = 2 @@ -1338,9 +1337,9 @@ text = "UI_BACK" [node name="MultiplayerMenu" type="VBoxContainer" parent="Menu"] layout_mode = 1 anchors_preset = -1 -anchor_left = -0.5 +anchor_left = 1.5 anchor_top = 0.5 -anchor_right = -0.5 +anchor_right = 1.5 anchor_bottom = 0.5 grow_horizontal = 2 grow_vertical = 2 @@ -1363,9 +1362,9 @@ text = "UI_BACK" [node name="LocalMultiplayerMenu" type="VBoxContainer" parent="Menu"] layout_mode = 1 anchors_preset = -1 -anchor_left = 0.5 +anchor_left = 1.5 anchor_top = 0.5 -anchor_right = 0.5 +anchor_right = 1.5 anchor_bottom = 0.5 offset_left = -157.5 offset_top = -52.0