From 0082765ee73c00571b4e45e27c7845fafa2aea84 Mon Sep 17 00:00:00 2001 From: Phillip Tarrant Date: Fri, 10 Jul 2026 20:46:25 -0500 Subject: [PATCH] =?UTF-8?q?fix(theme):=20showcase=20renders=20every=20?= =?UTF-8?q?=C2=A76=20element=20(3rd=20surface,=203=20variations,=20all=20f?= =?UTF-8?q?onts,=20labelled=20swatches)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - _surfaces(): add VignetteOverlay.tscn alongside ParchmentPanel/DarkBay, backed by a Palette.STEEL ColorRect so the dim is visibly rendering. - _variations(): add ItemTileEmpty (next to filled ItemTile), ParchmentInset, and DarkPanel stylebox nodes. - _fonts(): new section rendering default serif body, Accent (Architects Daughter), and Mono (JetBrains Mono) labels at real sizes. - _swatches(): wrap each ColorRect in a VBoxContainer with a Mono caption Label naming its Palette const, per spec's "labelled swatches." No raw hex / Color(...) literals introduced; all colour via Palette.*, all styleboxes via ThemeKeys.* variation names. --- client/scripts/theme/theme_showcase.gd | 80 ++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 5 deletions(-) diff --git a/client/scripts/theme/theme_showcase.gd b/client/scripts/theme/theme_showcase.gd index f2ac838..fed6637 100644 --- a/client/scripts/theme/theme_showcase.gd +++ b/client/scripts/theme/theme_showcase.gd @@ -21,6 +21,7 @@ func _ready() -> void: col.add_child(_heading("SHARED THEME — SHOWCASE")) col.add_child(_swatches()) col.add_child(_variations()) + col.add_child(_fonts()) col.add_child(_rarity()) col.add_child(_bars()) col.add_child(_surfaces()) @@ -36,13 +37,24 @@ func _heading(text: String) -> Label: func _swatches() -> Control: var grid := GridContainer.new() grid.columns = 8 - for c in [Palette.STAGE_1, Palette.BAY_STRIPE_A, Palette.DARK_PANEL_70, - Palette.SHEET_TOP, Palette.PARCHMENT_CARD, Palette.BLOOD, Palette.GOLD, - Palette.STEEL, Palette.GREEN, Palette.INK_BODY, Palette.CREAM]: + var tokens := [ + ["STAGE_1", Palette.STAGE_1], ["BAY_STRIPE_A", Palette.BAY_STRIPE_A], + ["DARK_PANEL_70", Palette.DARK_PANEL_70], ["SHEET_TOP", Palette.SHEET_TOP], + ["PARCHMENT_CARD", Palette.PARCHMENT_CARD], ["BLOOD", Palette.BLOOD], + ["GOLD", Palette.GOLD], ["STEEL", Palette.STEEL], ["GREEN", Palette.GREEN], + ["INK_BODY", Palette.INK_BODY], ["CREAM", Palette.CREAM], + ] + for entry in tokens: + var col := VBoxContainer.new() var r := ColorRect.new() - r.color = c + r.color = entry[1] r.custom_minimum_size = Vector2(120, 60) - grid.add_child(r) + col.add_child(r) + var caption := Label.new() + caption.text = entry[0] + caption.theme_type_variation = &"Mono" + col.add_child(caption) + grid.add_child(col) return grid @@ -58,9 +70,53 @@ func _variations() -> Control: var card := PanelContainer.new(); card.theme_type_variation = ThemeKeys.PARCHMENT_CARD card.custom_minimum_size = Vector2(160, 80) row.add_child(card) + + # Filled vs empty item tile, side by side for comparison. + var tile_filled := PanelContainer.new() + tile_filled.theme_type_variation = ThemeKeys.ITEM_TILE + tile_filled.custom_minimum_size = Vector2(64, 64) + row.add_child(tile_filled) + var tile_empty := PanelContainer.new() + tile_empty.theme_type_variation = ThemeKeys.ITEM_TILE_EMPTY + tile_empty.custom_minimum_size = Vector2(64, 64) + row.add_child(tile_empty) + + var inset := PanelContainer.new() + inset.theme_type_variation = ThemeKeys.PARCHMENT_INSET + inset.custom_minimum_size = Vector2(160, 80) + row.add_child(inset) + + var dark := PanelContainer.new() + dark.theme_type_variation = ThemeKeys.DARK_PANEL + dark.custom_minimum_size = Vector2(160, 80) + row.add_child(dark) + return row +func _fonts() -> Control: + # All three bundled font families, at their real Theme sizes, plus the + # default serif body face (not otherwise shown elsewhere on this screen). + var col := VBoxContainer.new() + col.add_theme_constant_override("separation", 6) + + var body := Label.new() + body.text = "The road to the Ashmarch is longer than the maps admit." + col.add_child(body) + + var accent := Label.new() + accent.text = "Vexcca of the Ashmarch" + accent.theme_type_variation = &"Accent" + col.add_child(accent) + + var mono := Label.new() + mono.text = "STR 14 · INITIATIVE +2 · AC 16" + mono.theme_type_variation = &"Mono" + col.add_child(mono) + + return col + + func _rarity() -> Control: var row := HBoxContainer.new() for i in range(5): @@ -94,4 +150,18 @@ func _surfaces() -> Control: var s = load(path).instantiate() s.custom_minimum_size = Vector2(600, 220) row.add_child(s) + + # VignetteOverlay draws a black-with-alpha dim; give it a mid-tone backing + # so the dim is visibly rendering rather than reading as empty space. + var vignette_slot := Control.new() + vignette_slot.custom_minimum_size = Vector2(600, 220) + var backing := ColorRect.new() + backing.color = Palette.STEEL + backing.set_anchors_preset(Control.PRESET_FULL_RECT) + vignette_slot.add_child(backing) + var vignette = load("res://scenes/theme/surfaces/VignetteOverlay.tscn").instantiate() + vignette.set_anchors_preset(Control.PRESET_FULL_RECT) + vignette_slot.add_child(vignette) + row.add_child(vignette_slot) + return row