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

@@ -160,26 +160,29 @@ func (w *Chat) Draw(screen tcell.Screen) {
func (w *Chat) SetStyle(s tcell.Style) { w.style = s }
func (w *Chat) Active() bool { return w.active }
func (w *Chat) SetActive(a bool) { w.active = a }
func (w *Chat) Visible() bool { return w.visible }
func (w *Chat) SetVisible(a bool) { w.visible = a }
func (w *Chat) Focusable() bool { return w.focusable }
func (w *Chat) SetFocusable(b bool) { w.focusable = b }
func (w *Chat) SetX(x int) { w.x = x }
func (w *Chat) SetY(y int) { w.y = y }
func (w *Chat) GetX() int { return w.x }
func (w *Chat) GetY() int { return w.y }
func (w *Chat) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
func (w *Chat) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
func (w *Chat) GetW() int { return w.w }
func (w *Chat) GetH() int { return w.h }
func (w *Chat) SetW(wd int) { w.w = wd }
func (w *Chat) SetH(h int) { w.h = h }
func (w *Chat) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
func (w *Chat) WantW() int { return wh.MaxInt }
func (w *Chat) WantH() int { return wh.MaxInt }
func (w *Chat) MinW() int { return 2 + 20 }
func (w *Chat) MinH() int { return 6 }
func (w *Chat) SetActive(a bool) bool {
w.active = a
return w.active
}
func (w *Chat) Visible() bool { return w.visible }
func (w *Chat) SetVisible(a bool) { w.visible = a }
func (w *Chat) Focusable() bool { return w.focusable }
func (w *Chat) SetFocusable(b bool) { w.focusable = b }
func (w *Chat) SetX(x int) { w.x = x }
func (w *Chat) SetY(y int) { w.y = y }
func (w *Chat) GetX() int { return w.x }
func (w *Chat) GetY() int { return w.y }
func (w *Chat) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
func (w *Chat) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
func (w *Chat) GetW() int { return w.w }
func (w *Chat) GetH() int { return w.h }
func (w *Chat) SetW(wd int) { w.w = wd }
func (w *Chat) SetH(h int) { w.h = h }
func (w *Chat) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
func (w *Chat) WantW() int { return wh.MaxInt }
func (w *Chat) WantH() int { return wh.MaxInt }
func (w *Chat) MinW() int { return 2 + 20 }
func (w *Chat) MinH() int { return 6 }
func (w *Chat) initKeyMap() {
w.keyMap = NewKeyMap(