okay giant ux refactor to hopefully make it cleaner

This commit is contained in:
2025-08-31 13:29:52 -04:00
parent 430259475b
commit dda0a83202
12 changed files with 214 additions and 198 deletions

View File

@@ -2,24 +2,17 @@ package stacks
import (
"git.vezzani.net/ben/games/common/elements/v1"
"git.vezzani.net/ben/games/common/elements/v1/blocks"
)
type Option func(*Stack)
type OptFunc func(*Stack)
func BlockOpt(o blocks.Option) Option {
return func(s *Stack) {
o(&s.Block)
}
}
func Children(children ...elements.InitFunc) Option {
func Children(children ...elements.InitFunc) OptFunc {
return func(s *Stack) {
s.childrenInit = children
}
}
func Horizontal() Option {
func Horizontal() OptFunc {
return func(s *Stack) {
s.horizontal = true
}