The manager that holds widgets is the WidgetManager
ci/woodpecker/push/woodpecker Pipeline was successful

UIManager named the category, not the contents. Every other manager is
named after what it registers — ItemManager holds Items, SceneManager
holds Scenes — so the one that registers Widgets is the WidgetManager.

The alias, the Game field and both manual pages move together.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-30 22:05:55 +02:00
co-authored by Claude Opus 5
parent e26f7345c1
commit 53f4df0466
7 changed files with 48 additions and 48 deletions
+4 -4
View File
@@ -1,12 +1,12 @@
package inkwell
// UIManager registers Widget instances. Same shape as every other manager.
type UIManager = Manager[Widget]
// WidgetManager registers Widget instances. Same shape as every other manager.
type WidgetManager = 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 {
func reversedWidgets(m *WidgetManager) []Widget {
all := m.All()
out := make([]Widget, len(all))
for i, w := range all {
@@ -16,4 +16,4 @@ func reversedWidgets(m *UIManager) []Widget {
}
// orderedWidgets iterates in registration order — bottom-up draw.
func orderedWidgets(m *UIManager) []Widget { return m.All() }
func orderedWidgets(m *WidgetManager) []Widget { return m.All() }