Files
Phillip Tarrant 0c12e13ac1 fix(theme): drop redundant const preloads shadowing global class_names
palette.gd / theme_keys.gd already declare `class_name`, so `const Palette =
preload(...)` in every consumer shadowed the global class and emitted 4
editor errors ("has the same name as a global class"). Reference the global
class_names directly. Editor reload now clean; suite 125/125; runtime probe
still builds all 75 showcase nodes with the theme applied.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 21:58:34 -05:00

15 lines
623 B
GDScript

class_name ParchmentPanel
extends Panel
## Drop-in parchment backdrop (mockups "Dark Bay + Parchment" motif). §2: presentation.
## Uniforms are set at runtime from Palette (deliberate deviation from spec §5.4's
## "baked into the .tscn/material" approach) — keeps Palette the single source of
## truth at the cost of an editor preview; the surface renders once the scene runs.
func _ready() -> void:
var m := ShaderMaterial.new()
m.shader = load("res://assets/theme/shaders/parchment.gdshader")
m.set_shader_parameter("top", Palette.SHEET_TOP)
m.set_shader_parameter("bottom", Palette.SHEET_BOTTOM)
material = m