cleaning up the component system just a bit more...

This commit is contained in:
2025-08-31 21:15:18 -04:00
parent e454d649a5
commit 5f47a811aa
9 changed files with 114 additions and 110 deletions

View File

@@ -3,14 +3,17 @@ package buttons
import (
"image/color"
"git.vezzani.net/ben/games/common/elements/v1"
"git.vezzani.net/ben/games/common/elements/v1/blocks"
"git.vezzani.net/ben/games/common/elements/v1/mouse"
)
type OptFunc func(button *Button)
type Option interface {
OptFunc | blocks.OptFunc
func Core(f elements.OptFunc) OptFunc {
return func(b *Button) {
f(&b.Core)
}
}
func OnClick(f func(ms mouse.State)) OptFunc {