okay giant ux refactor to hopefully make it cleaner
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user