holy crap click handling works too
This commit was merged in pull request #5.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user