From 3942adf26b61490ffafa459b5f178fc11addf127 Mon Sep 17 00:00:00 2001 From: Natalie Date: Fri, 19 Jun 2026 04:32:01 -0500 Subject: [PATCH] =?UTF-8?q?refactor(@projects/@magic-civilization):=20?= =?UTF-8?q?=F0=9F=8E=A8=20top=5Fbar=20happiness=20label=20=E2=86=92=20cond?= =?UTF-8?q?itional=20theme=5Ftype=5Fvariation=20(p2-87)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Migrate the %HappinessLabel state-conditional font_color (positive/negative/ neutral) to theme_type_variation (LabelPositive/Negative/Secondary). It's a Label (top_bar.tscn:86), so the variation applies cleanly and is value-preserving. This completes the static Label font_color override→inheritance migration. The only remaining add_theme_color_override("font_color", ...) are 2 Button state-toggles (lens_switcher active-lens, overlay_panel) — genuinely dynamic (toggled per UI state, would need a Button-based variation), left as the dynamic carve-out. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/game/engine/scenes/hud/top_bar.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/engine/scenes/hud/top_bar.gd b/src/game/engine/scenes/hud/top_bar.gd index d71638d1..a4d23d60 100644 --- a/src/game/engine/scenes/hud/top_bar.gd +++ b/src/game/engine/scenes/hud/top_bar.gd @@ -150,11 +150,11 @@ func _update_happiness(value: int) -> void: var status_label: String = ThemeVocabulary.lookup("happiness_status_" + status) %HappinessLabel.text = ThemeVocabulary.lookup("fmt_top_bar_dot") % [status_label, _format_signed(value)] if value > 0: - %HappinessLabel.add_theme_color_override("font_color", ThemeAssets.color("semantic.positive")) + %HappinessLabel.theme_type_variation = "LabelPositive" elif value < 0: - %HappinessLabel.add_theme_color_override("font_color", ThemeAssets.color("semantic.negative")) + %HappinessLabel.theme_type_variation = "LabelNegative" else: - %HappinessLabel.add_theme_color_override("font_color", ThemeAssets.color("text.secondary")) + %HappinessLabel.theme_type_variation = "LabelSecondary" func _update_golden_age_badge() -> void: