The manager that holds widgets is the WidgetManager
ci/woodpecker/push/woodpecker Pipeline was successful
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:
+2
-2
@@ -61,7 +61,7 @@ func (e *engine) Update() error {
|
||||
// Top-down input: the widget drawn last (= registered last) gets the
|
||||
// click first, then the next-to-last, etc. A widget signals "I took it"
|
||||
// via g.Input.ConsumeLeft / ConsumeRight.
|
||||
for _, w := range reversedWidgets(g.UIManager) {
|
||||
for _, w := range reversedWidgets(g.WidgetManager) {
|
||||
w.Tick(uictx)
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ func (e *engine) Draw(screen *ebiten.Image) {
|
||||
|
||||
// widgets in registration order
|
||||
uictx := &UICtx{Game: g, DT: 1.0 / 60.0}
|
||||
for _, w := range orderedWidgets(g.UIManager) {
|
||||
for _, w := range orderedWidgets(g.WidgetManager) {
|
||||
w.Draw(screen, uictx)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user