Changed 'Tabbable/Focusable' logic to use Active

This commit is contained in:
2026-02-02 13:29:51 -06:00
parent 62ef3b5d44
commit 16a92c8f99
30 changed files with 377 additions and 322 deletions

View File

@@ -82,22 +82,25 @@ func (w *ArtWidget) Draw(screen tcell.Screen) {
func (w *ArtWidget) SetStyle(s tcell.Style) { w.style = s }
func (w *ArtWidget) Active() bool { return w.active }
func (w *ArtWidget) SetActive(a bool) { w.active = a }
func (w *ArtWidget) Visible() bool { return w.visible }
func (w *ArtWidget) SetVisible(v bool) { w.visible = v }
func (w *ArtWidget) Focusable() bool { return w.focusable }
func (w *ArtWidget) SetFocusable(t bool) { w.focusable = t }
func (w *ArtWidget) SetX(x int) { w.x = x }
func (w *ArtWidget) SetY(y int) { w.y = y }
func (w *ArtWidget) GetX() int { return w.x }
func (w *ArtWidget) GetY() int { return w.y }
func (w *ArtWidget) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
func (w *ArtWidget) SetPos(pos Coord) { w.x, w.y = pos.X, pos.Y }
func (w *ArtWidget) SetSize(size Coord) { w.w, w.h = size.X, size.Y }
func (w *ArtWidget) SetW(wd int) { w.w = wd }
func (w *ArtWidget) SetH(h int) { w.h = h }
func (w *ArtWidget) GetW() int { return w.w }
func (w *ArtWidget) GetH() int { return w.h }
func (w *ArtWidget) SetActive(a bool) bool {
w.active = a
return w.active
}
func (w *ArtWidget) Visible() bool { return w.visible }
func (w *ArtWidget) SetVisible(v bool) { w.visible = v }
func (w *ArtWidget) Focusable() bool { return w.focusable }
func (w *ArtWidget) SetFocusable(t bool) { w.focusable = t }
func (w *ArtWidget) SetX(x int) { w.x = x }
func (w *ArtWidget) SetY(y int) { w.y = y }
func (w *ArtWidget) GetX() int { return w.x }
func (w *ArtWidget) GetY() int { return w.y }
func (w *ArtWidget) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
func (w *ArtWidget) SetPos(pos Coord) { w.x, w.y = pos.X, pos.Y }
func (w *ArtWidget) SetSize(size Coord) { w.w, w.h = size.X, size.Y }
func (w *ArtWidget) SetW(wd int) { w.w = wd }
func (w *ArtWidget) SetH(h int) { w.h = h }
func (w *ArtWidget) GetW() int { return w.w }
func (w *ArtWidget) GetH() int { return w.h }
func (w *ArtWidget) WantW() int { return w.buffer.Width() }
func (w *ArtWidget) WantH() int { return w.buffer.Height() }