Registration order was the only thing deciding what a widget was drawn over, which forced a domain to keep one ordered list of every widget it owns — the one shape that cannot be split into a file per widget. A widget now says where it belongs: Layer, the eight LayerScene..LayerCursor constants, the optional Layered interface and LayerOf for wrappers. Draw runs from the bottom layer up, Tick from the top down, and registration order only breaks ties inside a layer. Every built-in declares its own; anything that stays quiet sits on LayerHUD, so existing HUDs come out where they were. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,7 @@ type DialogBox struct {
|
||||
}
|
||||
|
||||
func (d *DialogBox) GetName() string { return d.Name }
|
||||
func (d *DialogBox) Layer() Layer { return LayerDialog }
|
||||
|
||||
func (d *DialogBox) Tick(ctx *UICtx) {
|
||||
g := ctx.Game
|
||||
|
||||
Reference in New Issue
Block a user