Files
games/common/elements/v1/element.go

30 lines
432 B
Go

package elements
import (
"git.vezzani.net/ben/games/common/elements/v1/mouse"
"github.com/hajimehoshi/ebiten/v2"
)
type ElementFunc func(Bounds) Element
type Clickable interface {
}
type Mouseable interface {
}
type Element interface {
HandleMouseEvent(s mouse.State) bool
Draw(image *ebiten.Image) (w, h float64)
}
type Point struct {
X, Y float64
}
type Bounds struct {
Min Point
Width, Height float64
}