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.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
extends SceneTree
|
||||
|
||||
const SPAWNER := preload("res://scripts/stage_spawner.gd")
|
||||
const CARD := preload("res://scripts/ui/asset_card.gd")
|
||||
var _failures: int = 0
|
||||
|
||||
func _init() -> void:
|
||||
var world := Node2D.new()
|
||||
var spawner = SPAWNER.new(world)
|
||||
var entries: Array[Dictionary] = spawner.get_palette_entries()
|
||||
_check(entries.size() == 6, "six registry cards")
|
||||
_check(String(entries[0].get("placement_id", "")) == "ground", "registry id retained")
|
||||
var card = CARD.new(); card.configure(entries[0]); _check(card.payload().get("kind", "") == "terrain", "card copies payload")
|
||||
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 palette: " + message)
|
||||
Reference in New Issue
Block a user