DrawOffset

This commit is contained in:
2025-08-06 20:55:44 -05:00
parent 81c7ec8324
commit 7c96fbb187
20 changed files with 168 additions and 29 deletions

View File

@@ -91,6 +91,13 @@ func (w *Checkbox) Draw(screen tcell.Screen) {
}
h.DrawText(w.x, w.y, fmt.Sprintf("[%s] %s", string(w.state), w.label), dStyle, screen)
}
func (w *Checkbox) DrawOffset(c Coord, screen tcell.Screen) {
p := w.GetPos()
w.SetPos(p.Add(c))
w.Draw(screen)
w.SetPos(p)
}
func (w *Checkbox) Active() bool { return w.active }
func (w *Checkbox) SetActive(a bool) { w.active = a }
func (w *Checkbox) Visible() bool { return w.visible }