package hud import "github.com/hajimehoshi/ebiten/v2" type HudInput int const ( InputUp HudInput = iota InputDown InputLeft InputRight ) type Element interface { SetPos(x, y int) GetPos() (int, int) Input(input HudInput) Draw(time float32, screen *ebiten.Image) } type BaseElement struct { X, Y int } func (e *BaseElement) SetPos(x, y int) { e.X = x e.Y = y } func (e *BaseElement) GetPos() (int, int) { return e.X, e.Y }