fix(shell): readable ink prose + uniform consumable tiles
The narration RichTextLabel had no theme styling, so it rendered near-white
and was unreadable on parchment. Add a base RichTextLabel style to the theme
(dark INK_BODY serif at 20px, italic face wired) — systemic and previews in
the editor; every parchment prose surface now reads as dark ink. Also clip
the consumable slot labels so a long name ("Antidote") can't stretch its tile
wider than the empty ones — all 8 stay a uniform 62px.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,7 @@ extends SceneTree
|
||||
|
||||
const OUT := "res://assets/theme/game_theme.tres"
|
||||
const SERIF := "res://assets/theme/fonts/EBGaramond-VariableFont_wght.ttf"
|
||||
const SERIF_ITALIC := "res://assets/theme/fonts/EBGaramond-Italic-VariableFont_wght.ttf"
|
||||
const ACCENT := "res://assets/theme/fonts/ArchitectsDaughter-Regular.ttf"
|
||||
const MONO := "res://assets/theme/fonts/JetBrainsMono-VariableFont_wght.ttf"
|
||||
|
||||
@@ -33,6 +34,7 @@ func _init() -> void:
|
||||
static func build_theme() -> Theme:
|
||||
var theme := Theme.new()
|
||||
_fonts(theme)
|
||||
_rich_text(theme)
|
||||
_primary_cta(theme)
|
||||
_tabs(theme)
|
||||
_dock_button(theme)
|
||||
@@ -78,6 +80,18 @@ static func _fonts(theme: Theme) -> void:
|
||||
theme.set_color(&"font_color", ThemeKeys.MONO, Palette.MUTED_MONO)
|
||||
|
||||
|
||||
static func _rich_text(theme: Theme) -> void:
|
||||
# Base RichTextLabel styling — the narrative "prose" voice (mock README §Typography:
|
||||
# Georgia/serif for DM/flavor body, italic for emphasis). RichTextLabel does NOT
|
||||
# inherit default_font/default_color, so without this its text renders in the engine
|
||||
# default (near-white) and is unreadable on parchment. Every parchment prose surface
|
||||
# (the narration book, later quest briefs/dialogue) reads dark serif ink from here.
|
||||
theme.set_font(&"normal_font", "RichTextLabel", load(SERIF))
|
||||
theme.set_font(&"italics_font", "RichTextLabel", load(SERIF_ITALIC))
|
||||
theme.set_font_size(&"normal_font_size", "RichTextLabel", 20)
|
||||
theme.set_color(&"default_color", "RichTextLabel", Palette.INK_BODY)
|
||||
|
||||
|
||||
static func _primary_cta(theme: Theme) -> void:
|
||||
var k := ThemeKeys.PRIMARY_CTA
|
||||
theme.set_type_variation(k, "Button")
|
||||
|
||||
Reference in New Issue
Block a user