From b7ab82d05186a39cba25eb3428828ef54686e3fb Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Thu, 23 Mar 2023 03:38:29 -0400 Subject: Make default_theme.tres the project theme Remove default_theme as theme for GameMenu Usable as a result of Godot 4.0.1 update Move theme resources to theme directory Move theme_assets to theme/assets For better theme organization Remove scene/node specific theme overrides Use theme_type_variation for nodes in MainMenu, OptionsMenu, CreditsMenu Decreases coupling of theme values in scenes and the scene tree Assign theme resources to MainMenu, OptionsMenu, and CreditsMenu Separates general default theme values and scene specific theme values Reduces the specificity and verbosity of theme type variation names Rename MainMenu/Panel/VBox/Margin2 to BottomMargin For better clarity of Margin's purpose Add newline to end of CreditsMenu.gd --- game/src/CreditsMenu/CreditsMenu.gd | 2 +- game/src/CreditsMenu/CreditsMenu.tscn | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'game/src/CreditsMenu') diff --git a/game/src/CreditsMenu/CreditsMenu.gd b/game/src/CreditsMenu/CreditsMenu.gd index be992ef..52c1711 100644 --- a/game/src/CreditsMenu/CreditsMenu.gd +++ b/game/src/CreditsMenu/CreditsMenu.gd @@ -123,4 +123,4 @@ func _ready(): # * UI-38 # * UIFUN-37 func _on_back_button_pressed() -> void: - back_button_pressed.emit() \ No newline at end of file + back_button_pressed.emit() diff --git a/game/src/CreditsMenu/CreditsMenu.tscn b/game/src/CreditsMenu/CreditsMenu.tscn index 8a81823..d2819d7 100644 --- a/game/src/CreditsMenu/CreditsMenu.tscn +++ b/game/src/CreditsMenu/CreditsMenu.tscn @@ -1,5 +1,6 @@ -[gd_scene load_steps=2 format=3 uid="uid://c8knthxkwj1uj"] +[gd_scene load_steps=3 format=3 uid="uid://c8knthxkwj1uj"] +[ext_resource type="Theme" uid="uid://stfxt4hpsify" path="res://theme/credits_menu.tres" id="1_7y4l8"] [ext_resource type="Script" path="res://src/CreditsMenu/CreditsMenu.gd" id="1_csd7i"] [node name="CreditsMenu" type="Control" node_paths=PackedStringArray("credits_list")] @@ -10,11 +11,12 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +theme = ExtResource("1_7y4l8") script = ExtResource("1_csd7i") core_credits_path = "res://common/credits.csv" -label_variants_project = &"Label_ProjectCredits" -label_variants_role = &"Label_RoleCredits" -label_variants_person = &"Label_PersonCredits" +label_variants_project = &"ProjectLabel" +label_variants_role = &"RoleLabel" +label_variants_person = &"PersonLabel" credits_list = NodePath("Scroll/CreditsList") [node name="ControlMargin" type="MarginContainer" parent="."] @@ -22,10 +24,7 @@ layout_mode = 2 anchor_right = 1.0 anchor_bottom = 0.071 offset_bottom = -0.120003 -theme_override_constants/margin_left = 20 -theme_override_constants/margin_top = 10 -theme_override_constants/margin_right = 20 -theme_override_constants/margin_bottom = 10 +theme_type_variation = &"BackButtonsMargin" [node name="BackButton" type="Button" parent="ControlMargin"] editor_description = "UI-38" -- cgit v1.2.3-56-ga3b1