okay giant ux refactor to hopefully make it cleaner
This commit is contained in:
@@ -2,21 +2,21 @@ package blocks
|
||||
|
||||
import "image/color"
|
||||
|
||||
type Option func(*Block)
|
||||
type OptFunc func(*Block)
|
||||
|
||||
func Size(w, h float64) Option {
|
||||
func Size(w, h int) OptFunc {
|
||||
return func(b *Block) {
|
||||
b.width, b.height = w, h
|
||||
}
|
||||
}
|
||||
|
||||
func BackgroundColor(c color.Color) Option {
|
||||
func BackgroundColor(c color.Color) OptFunc {
|
||||
return func(b *Block) {
|
||||
b.backgroundColor = &c
|
||||
}
|
||||
}
|
||||
|
||||
func Name(n string) Option {
|
||||
func Name(n string) OptFunc {
|
||||
return func(b *Block) {
|
||||
b.name = n
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user