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

@@ -131,6 +131,13 @@ func (w *Field) Draw(screen tcell.Screen) {
x += 1
h.DrawText(x, w.y, post, useStyle, screen)
}
func (w *Field) DrawOffset(c Coord, screen tcell.Screen) {
p := w.GetPos()
w.SetPos(p.Add(c))
w.Draw(screen)
w.SetPos(p)
}
func (w *Field) Active() bool { return w.active }
func (w *Field) SetActive(a bool) { w.active = a }
func (w *Field) Visible() bool { return w.visible }