Add feedback components 106-130; inert scope, focus return, two-step deploy

This commit is contained in:
ZacharyZhang-NY committed 2026-10-11 20:58:30 -04:00
1 parent bce416182e
commit bd3877e1b1
87 files changed
+2492 -147

No files matched your search

+1 -12
View File
@@ -23,20 +23,9 @@ func art(c *ui.Context, k pixel.Kit, label string, w, h int, fn func(g pixel.Can
return e
}
// orDef is v, or def for zero; negative panics.
func orDef(name string, v, def int) int {
if v < 0 {
panic(fmt.Sprintf("display: %s %d is negative", name, v))
}
if v == 0 {
return def
}
return v
}
// scale is s, or 1 for zero; outside 1–4 panics.
func scale(s int) int {
s = orDef("Scale", s, 1)
s = pixel.Or("Scale", s, 1)
if s > 4 {
panic(fmt.Sprintf("display: Scale %d outside 1–4", s))
}