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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user