From c6d513c966e908076b03f13678bd8d633a7e2091 Mon Sep 17 00:00:00 2001 From: Phillip Tarrant Date: Sat, 11 Jul 2026 10:41:42 -0500 Subject: [PATCH] feat(theme): TitleLogo + TitleKicker display variations Co-Authored-By: Claude Opus 4.8 (1M context) --- client/assets/theme/game_theme.tres | 8 ++++++++ client/scripts/theme/build_game_theme.gd | 15 +++++++++++++++ client/scripts/theme/theme_keys.gd | 2 ++ client/tests/unit/test_title_theme.gd | 10 ++++++++++ client/tests/unit/test_title_theme.gd.uid | 1 + 5 files changed, 36 insertions(+) create mode 100644 client/tests/unit/test_title_theme.gd create mode 100644 client/tests/unit/test_title_theme.gd.uid diff --git a/client/assets/theme/game_theme.tres b/client/assets/theme/game_theme.tres index 3b1a1ad..c6c3265 100644 --- a/client/assets/theme/game_theme.tres +++ b/client/assets/theme/game_theme.tres @@ -486,3 +486,11 @@ TabActive/styles/focus = SubResource("StyleBoxEmpty_wmbj4") TabActive/styles/hover = SubResource("StyleBoxFlat_xdylb") TabActive/styles/normal = SubResource("StyleBoxFlat_pjnll") TabActive/styles/pressed = SubResource("StyleBoxFlat_klelq") +TitleKicker/base_type = &"Label" +TitleKicker/colors/font_color = Color(0.6627451, 0.5176471, 0.24705882, 1) +TitleKicker/font_sizes/font_size = 13 +TitleKicker/fonts/font = ExtResource("2_4lwr2") +TitleLogo/base_type = &"Label" +TitleLogo/colors/font_color = Color(0.9098039, 0.8666667, 0.78431374, 1) +TitleLogo/font_sizes/font_size = 116 +TitleLogo/fonts/font = ExtResource("3_eckwq") diff --git a/client/scripts/theme/build_game_theme.gd b/client/scripts/theme/build_game_theme.gd index ec1c137..3154db1 100644 --- a/client/scripts/theme/build_game_theme.gd +++ b/client/scripts/theme/build_game_theme.gd @@ -34,6 +34,7 @@ func _init() -> void: static func build_theme() -> Theme: var theme := Theme.new() _fonts(theme) + _title_type(theme) _rich_text(theme) _primary_cta(theme) _tabs(theme) @@ -80,6 +81,20 @@ static func _fonts(theme: Theme) -> void: theme.set_color(&"font_color", ThemeKeys.MONO, Palette.MUTED_MONO) +static func _title_type(theme: Theme) -> void: + # Title-screen display type (mock Title Screen): the big serif logo + the mono + # kicker above it. Label font-role variations (font/size/colour), the same + # shape as Heading/Accent/Mono. + theme.set_type_variation(ThemeKeys.TITLE_LOGO, "Label") + theme.set_font(&"font", ThemeKeys.TITLE_LOGO, load(SERIF)) + theme.set_font_size(&"font_size", ThemeKeys.TITLE_LOGO, 116) + theme.set_color(&"font_color", ThemeKeys.TITLE_LOGO, Palette.CREAM) + theme.set_type_variation(ThemeKeys.TITLE_KICKER, "Label") + theme.set_font(&"font", ThemeKeys.TITLE_KICKER, load(MONO)) + theme.set_font_size(&"font_size", ThemeKeys.TITLE_KICKER, 13) + theme.set_color(&"font_color", ThemeKeys.TITLE_KICKER, Palette.GOLD) + + static func _rich_text(theme: Theme) -> void: # Base RichTextLabel styling — the narrative "prose" voice (mock README §Typography: # Georgia/serif for DM/flavor body, italic for emphasis). RichTextLabel does NOT diff --git a/client/scripts/theme/theme_keys.gd b/client/scripts/theme/theme_keys.gd index 3de8ff0..6f8578f 100644 --- a/client/scripts/theme/theme_keys.gd +++ b/client/scripts/theme/theme_keys.gd @@ -22,6 +22,8 @@ const DARK_PANEL := &"DarkPanel" const HEADING := &"Heading" const ACCENT := &"Accent" const MONO := &"Mono" +const TITLE_LOGO := &"TitleLogo" +const TITLE_KICKER := &"TitleKicker" ## Every variation name + the base Control type it decorates. The builder and the ## test both iterate this so they can never drift apart. diff --git a/client/tests/unit/test_title_theme.gd b/client/tests/unit/test_title_theme.gd new file mode 100644 index 0000000..b635e81 --- /dev/null +++ b/client/tests/unit/test_title_theme.gd @@ -0,0 +1,10 @@ +extends "res://addons/gut/test.gd" + +const Builder = preload("res://scripts/theme/build_game_theme.gd") + + +func test_title_variations_built(): + var t: Theme = Builder.build_theme() + assert_eq(t.get_font_size(&"font_size", ThemeKeys.TITLE_LOGO), 116) + assert_eq(t.get_color(&"font_color", ThemeKeys.TITLE_LOGO), Palette.CREAM) + assert_eq(t.get_color(&"font_color", ThemeKeys.TITLE_KICKER), Palette.GOLD) diff --git a/client/tests/unit/test_title_theme.gd.uid b/client/tests/unit/test_title_theme.gd.uid new file mode 100644 index 0000000..45da8fb --- /dev/null +++ b/client/tests/unit/test_title_theme.gd.uid @@ -0,0 +1 @@ +uid://dbqle1sf0byj4