holy crap click handling works too

This commit was merged in pull request #5.
This commit is contained in:
2025-08-29 22:58:06 -04:00
parent 4829fbb5c7
commit 430259475b
9 changed files with 173 additions and 119 deletions

View File

@@ -9,7 +9,7 @@ import (
"github.com/hajimehoshi/ebiten/v2/vector"
)
func New(ops ...Option) elements.ElementFunc {
func New(ops ...Option) elements.InitFunc {
return func(d elements.Bounds) elements.Element {
b := Block{
ContainerBounds: d,
@@ -41,8 +41,8 @@ func (b *Block) Size() (w, h float64) {
return
}
func (b *Block) Draw(image *ebiten.Image) (w, h float64) {
w, h = b.Size()
func (b *Block) Draw(image *ebiten.Image) {
w, h := b.Size()
if b.backgroundColor != nil {
vector.DrawFilledRect(
image,