TableTower/ui/builtin_themes.gd
RobinFiredrake 61a548902f Theme tiers 1-2: theme folders, mascot recolour, background scene and tile, frame sets, picture threads, sounds; nine new built-in themes
- ThemeAssets loads a theme's files; FrameSet + GradientMap (3-stop) generalise the card frame;
  ThreadStrip draws threads from a picture; BoardBackdrop draws scene and tile; MascotArt
  recolours Morgan by role (logo SVG now uses the Keep File importer); SoundBoard plays
  roll / card turn / thread / click / ambient with View > Sound levels.
- Vaporwave, Synthwave, Cozy Autumn, Rustic, Woodsy, Sky Blue, Frutiger Aero, Gothic, Terminal:
  generated art (tools/theme_art), sounds (tools/theme_sounds), settings (tools/theme_defs).
- Ten OFL fonts; --theme=<id> flag; docs/THEMES.md format spec; test_theme_assets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 15:05:40 -06:00

61 lines
2.9 KiB
GDScript

class_name BuiltinThemes
extends RefCounted
## The theme sets that ship with the app. Kept in code rather than JSON so they
## need no export filter. A set lists only what differs from Style's fallback
## values (the Felt look); ThemeStore fills in the rest.
##
## Set keys: id, name, colors {TOKEN: "#hex"}, background and panel fills
## ({kind: "solid"|"linear"|"radial", colors: [...], angle}), pattern
## ("none"|"dots"|"stars"), card_frame ("ornate"|"plain"), logo, font_body,
## font_display.
const TAROT := {
"id": "tarot", "name": "Tarot", "builtin": true,
"pattern": "stars", "logo": "fortune_teller", "card_frame": "ornate",
"font_body": "atkinson", "font_display": "rokkitt",
"sounds": {"roll": "sounds/roll.ogg", "card_turn": "sounds/card_turn.ogg"},
# A jewel-tone spread cloth with a soft shine up and to the left.
"background": {"kind": "radial", "colors": ["#4b1470", "#2c0744", "#1f0431"], "center": [0.32, 0.28]},
"panel": {"kind": "linear", "colors": ["#260539", "#16021f"], "angle": 90},
"colors": {
"BG": "#2c0744", "BG_DEEP": "#1c0329", "BG_HOVER": "#45106a", "PANEL": "#1c0329",
"ON_BG": "#f3e7f8", "ON_BG_MUTED": "#bba5cb",
"CARD": "#f4ead8", "CARD_SOFT": "#faf3e6", "CARD_HOVER": "#eadcc3", "CARD_SHADE": "#ddcdb0",
"INK": "#1c0329", "MUTED": "#6e5a7c", "FAINT": "#a08fae", "RULE": "#e2d2b8",
"DASH": "#c6b395", "HOVER_ROW": "#efe2cb", "STRIPE": "#5c0e7510",
"TRIM": "#823d08", "TRIM_DARK": "#4a2004",
"THREAD": "#c07a2c", "THREAD_DARK": "#5a2a06",
"ACCENT": "#f2b84b", "ACCENT_DARK": "#6b4a0c", "GROUP": "#f2b84b", "LIT": "#fbe3a6", "FLICK": "#f2b84b59",
"PULSE": "#fff3d6", "GLOW": "#2fe39a",
"OK_INK": "#04736e", "REF_INK": "#03635f", "REF_BG": "#d3eeea", "REF_INK_ON_BG": "#7fe8c9",
"VALUE_INK": "#7a3f06", "VALUE_INK_ON_BG": "#f2b84b", "VALUE_BG": "#fbf0d8", "VALUE_BORDER": "#e0b56a",
},
}
## The original green felt and copper look, kept as a second set.
const FELT := {
"id": "felt", "name": "Felt", "builtin": true,
"pattern": "dots", "logo": "tower", "card_frame": "plain",
"font_body": "atkinson", "font_display": "rokkitt",
"background": {"kind": "radial", "colors": ["#2a5c47", "#1f4a39"], "center": [0.35, 0.3]},
"panel": {"kind": "solid", "colors": ["#12301f"]},
"colors": {},
}
## The 2026-11 sets, one folder each (themes/<id>/: theme.gd plus its pictures and sounds).
const FOLDER_SETS := [
preload("res://themes/vaporwave/theme.gd"), preload("res://themes/synthwave/theme.gd"),
preload("res://themes/autumn/theme.gd"), preload("res://themes/rustic/theme.gd"),
preload("res://themes/woodsy/theme.gd"), preload("res://themes/sky/theme.gd"),
preload("res://themes/aero/theme.gd"), preload("res://themes/gothic/theme.gd"),
preload("res://themes/terminal/theme.gd"),
]
static func all() -> Array[Dictionary]:
var out: Array[Dictionary] = [TAROT]
for set_script: GDScript in FOLDER_SETS:
out.append(set_script.DATA)
out.append(FELT)
return out