feat(theme): parchment Button variation for clickable parchment rows

ThemeKeys.PARCHMENT_CARD is a PanelContainer-base variation (only a
`panel` stylebox) — a Button looks up normal/hover/pressed/disabled,
which don't exist there, so a Button styled with it renders unskinned.
Add PARCHMENT_BUTTON, a Button-base variation with those four
styleboxes plus an empty focus box, built from Palette colours only.
Same fix pattern as DOCK_BUTTON for the system dock. Regenerated
game_theme.tres from the builder.
This commit is contained in:
2026-07-11 09:07:16 -05:00
parent 35c4586792
commit bca04e3a2e
3 changed files with 120 additions and 27 deletions

View File

@@ -36,6 +36,7 @@ static func build_theme() -> Theme:
_primary_cta(theme)
_tabs(theme)
_dock_button(theme)
_parchment_button(theme)
_chip(theme)
_tiles(theme)
_cards_and_panels(theme)
@@ -120,6 +121,22 @@ static func _dock_button(theme: Theme) -> void:
theme.set_color(&"font_color", k, Palette.CREAM_SECONDARY)
static func _parchment_button(theme: Theme) -> void:
# Clickable parchment row/card for the narration book (mock 2a response
# choices + the refire affordance). Button-base so normal/hover/pressed/
# disabled styleboxes actually apply (a PanelContainer variation's lone
# `panel` stylebox does not skin a Button). Colours are the mock's choice-card.
var k := ThemeKeys.PARCHMENT_BUTTON
theme.set_type_variation(k, "Button")
theme.set_stylebox(&"normal", k, _flat(Palette.PARCHMENT_CARD, Palette.PARCHMENT_BORDER_3, 1, 8))
theme.set_stylebox(&"hover", k, _flat(Palette.PARCHMENT_INSET, Palette.INK_LABEL, 1, 8))
theme.set_stylebox(&"pressed", k, _flat(Palette.PARCHMENT_INSET_2, Palette.INK_LABEL, 1, 8))
theme.set_stylebox(&"disabled", k, _flat(Palette.PARCHMENT_INSET_2, Palette.PARCHMENT_BORDER_3, 1, 8))
theme.set_stylebox(&"focus", k, StyleBoxEmpty.new())
theme.set_color(&"font_color", k, Palette.INK_BODY)
theme.set_color(&"font_disabled_color", k, Palette.INK_MUTED)
static func _chip(theme: Theme) -> void:
# Base chip; the semantic colour (red/gold/grey) is applied per-use by script.
var k := ThemeKeys.CHIP

View File

@@ -10,6 +10,7 @@ const TAB := &"Tab"
const TAB_ACTIVE := &"TabActive"
const CHIP := &"Chip"
const DOCK_BUTTON := &"DockButton"
const PARCHMENT_BUTTON := &"ParchmentButton"
const ITEM_TILE := &"ItemTile"
const ITEM_TILE_EMPTY := &"ItemTileEmpty"
const PARCHMENT_CARD := &"ParchmentCard"
@@ -30,6 +31,7 @@ const ALL := {
TAB_ACTIVE: "Button",
CHIP: "Button",
DOCK_BUTTON: "Button",
PARCHMENT_BUTTON: "Button",
ITEM_TILE: "PanelContainer",
ITEM_TILE_EMPTY: "PanelContainer",
PARCHMENT_CARD: "PanelContainer",