remove demo game

This commit is contained in:
2026-05-25 21:28:17 +02:00
parent b1ea3447a8
commit 76f910ab36
75 changed files with 115 additions and 815 deletions

26
ui.manager.go Normal file
View File

@@ -0,0 +1,26 @@
package pncdsl
// UIManager registers Widget instances. Same shape as every other manager.
type UIManager = Manager[Widget]
// reversedWidgets iterates a manager's contents in reverse registration
// order — used by the engine for top-down input dispatch (the widget
// drawn on top gets the click first).
func reversedWidgets(m *UIManager) []Widget {
names := m.Names()
out := make([]Widget, len(names))
for i, n := range names {
out[len(names)-1-i] = m.MustGet(n)
}
return out
}
// orderedWidgets iterates in registration order — bottom-up draw.
func orderedWidgets(m *UIManager) []Widget {
names := m.Names()
out := make([]Widget, len(names))
for i, n := range names {
out[i] = m.MustGet(n)
}
return out
}