Files
stickman/tests/test_phase7_theme.gd
ryan 1a2a43c805 Add reusable UI components for Phase 7 UI Polish
- Introduced `EmojiQuickGrid`, `FontPresetPicker`, and `PresetSizeToggle` classes for emoji selection, font presets, and size toggles respectively.
- Implemented configuration methods for each component to handle dynamic content and theming.
- Created tests for the new components to ensure functionality and integration with the existing UI.
- Added a comprehensive architecture specification for Phase 7 UI Polish detailing scope, implementation, and validation strategies.
- Updated existing theme handling to support new UI elements and ensure consistent styling across the application.
2026-09-18 09:42:48 -04:00

23 lines
949 B
GDScript

extends SceneTree
const THEME_SCRIPT := preload("res://scripts/sandbox_theme.gd")
var _failures: int = 0
func _init() -> void:
var theme = THEME_SCRIPT.new()
_check(theme.load_from(), "committed v2 theme loads")
_check(theme.integer("fonts.sizes.tooltip", 0) == 18, "v2 font sizes resolve")
_check(theme.color("mode_colors.edit", Color.BLACK) == Color("#22c6ff"), "mode color resolves")
var first: StyleBoxFlat = theme.stylebox("palette")
first.bg_color = Color.RED
var second: StyleBoxFlat = theme.stylebox("palette")
_check(second.bg_color != Color.RED, "stylebox callers receive isolated copies")
_check(not theme.swatches().is_empty() and not theme.size_presets().is_empty(), "widget defaults available")
print("PASS" if _failures == 0 else "FAIL: %d" % _failures)
quit(0 if _failures == 0 else 1)
func _check(condition: bool, message: String) -> void:
if not condition:
_failures += 1
push_error("Phase 7 theme: " + message)