widget manager refact

This commit is contained in:
2026-08-30 22:27:51 +02:00
parent 258cbf85c0
commit 3890edc946
26 changed files with 413 additions and 242 deletions
+21
View File
@@ -0,0 +1,21 @@
package inc
import (
inkwell "git.teletypegames.org/engines/inkwell"
"github.com/hajimehoshi/ebiten/v2"
)
func init() {
WidgetManager.Register(&actionPump{
Name: "pump",
})
}
type actionPump struct {
Name string
}
func (p *actionPump) GetName() string { return p.Name }
func (p *actionPump) Layer() inkwell.Layer { return inkwell.LayerScene }
func (p *actionPump) Tick(ctx *inkwell.UICtx) { World.PumpTick(ctx.DT) }
func (p *actionPump) Draw(dst *ebiten.Image, ctx *inkwell.UICtx) {}