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,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
}