fix(theme): showcase renders every §6 element (3rd surface, 3 variations, all fonts, labelled swatches)
- _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.
This commit is contained in:
@@ -21,6 +21,7 @@ func _ready() -> void:
|
|||||||
col.add_child(_heading("SHARED THEME — SHOWCASE"))
|
col.add_child(_heading("SHARED THEME — SHOWCASE"))
|
||||||
col.add_child(_swatches())
|
col.add_child(_swatches())
|
||||||
col.add_child(_variations())
|
col.add_child(_variations())
|
||||||
|
col.add_child(_fonts())
|
||||||
col.add_child(_rarity())
|
col.add_child(_rarity())
|
||||||
col.add_child(_bars())
|
col.add_child(_bars())
|
||||||
col.add_child(_surfaces())
|
col.add_child(_surfaces())
|
||||||
@@ -36,13 +37,24 @@ func _heading(text: String) -> Label:
|
|||||||
func _swatches() -> Control:
|
func _swatches() -> Control:
|
||||||
var grid := GridContainer.new()
|
var grid := GridContainer.new()
|
||||||
grid.columns = 8
|
grid.columns = 8
|
||||||
for c in [Palette.STAGE_1, Palette.BAY_STRIPE_A, Palette.DARK_PANEL_70,
|
var tokens := [
|
||||||
Palette.SHEET_TOP, Palette.PARCHMENT_CARD, Palette.BLOOD, Palette.GOLD,
|
["STAGE_1", Palette.STAGE_1], ["BAY_STRIPE_A", Palette.BAY_STRIPE_A],
|
||||||
Palette.STEEL, Palette.GREEN, Palette.INK_BODY, Palette.CREAM]:
|
["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()
|
var r := ColorRect.new()
|
||||||
r.color = c
|
r.color = entry[1]
|
||||||
r.custom_minimum_size = Vector2(120, 60)
|
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
|
return grid
|
||||||
|
|
||||||
|
|
||||||
@@ -58,9 +70,53 @@ func _variations() -> Control:
|
|||||||
var card := PanelContainer.new(); card.theme_type_variation = ThemeKeys.PARCHMENT_CARD
|
var card := PanelContainer.new(); card.theme_type_variation = ThemeKeys.PARCHMENT_CARD
|
||||||
card.custom_minimum_size = Vector2(160, 80)
|
card.custom_minimum_size = Vector2(160, 80)
|
||||||
row.add_child(card)
|
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
|
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:
|
func _rarity() -> Control:
|
||||||
var row := HBoxContainer.new()
|
var row := HBoxContainer.new()
|
||||||
for i in range(5):
|
for i in range(5):
|
||||||
@@ -94,4 +150,18 @@ func _surfaces() -> Control:
|
|||||||
var s = load(path).instantiate()
|
var s = load(path).instantiate()
|
||||||
s.custom_minimum_size = Vector2(600, 220)
|
s.custom_minimum_size = Vector2(600, 220)
|
||||||
row.add_child(s)
|
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
|
return row
|
||||||
|
|||||||
Reference in New Issue
Block a user