Add SetStyle Function

This commit is contained in:
2026-01-23 09:36:43 -06:00
parent d442b7d6a8
commit c1296b1dc1
31 changed files with 425 additions and 392 deletions

View File

@@ -125,23 +125,24 @@ func (w *Alert) Draw(screen tcell.Screen) {
w.GetPos().DrawOffset(w.layout, screen)
}
func (w *Alert) Active() bool { return w.active }
func (w *Alert) SetActive(a bool) { w.active = a }
func (w *Alert) Visible() bool { return w.visible }
func (w *Alert) SetVisible(a bool) { w.visible = a }
func (w *Alert) SetX(x int) { w.x = x }
func (w *Alert) SetY(y int) { w.y = y }
func (w *Alert) GetX() int { return w.x }
func (w *Alert) GetY() int { return w.y }
func (w *Alert) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
func (w *Alert) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
func (w *Alert) SetW(x int) { w.w = x }
func (w *Alert) SetH(y int) { w.h = y }
func (w *Alert) GetW() int { return w.w }
func (w *Alert) GetH() int { return w.y }
func (w *Alert) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
func (w *Alert) Focusable() bool { return w.focusable }
func (w *Alert) SetFocusable(b bool) { w.focusable = b }
func (w *Alert) SetStyle(s tcell.Style) { w.style = s }
func (w *Alert) Active() bool { return w.active }
func (w *Alert) SetActive(a bool) { w.active = a }
func (w *Alert) Visible() bool { return w.visible }
func (w *Alert) SetVisible(a bool) { w.visible = a }
func (w *Alert) SetX(x int) { w.x = x }
func (w *Alert) SetY(y int) { w.y = y }
func (w *Alert) GetX() int { return w.x }
func (w *Alert) GetY() int { return w.y }
func (w *Alert) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
func (w *Alert) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
func (w *Alert) SetW(x int) { w.w = x }
func (w *Alert) SetH(y int) { w.h = y }
func (w *Alert) GetW() int { return w.w }
func (w *Alert) GetH() int { return w.y }
func (w *Alert) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
func (w *Alert) Focusable() bool { return w.focusable }
func (w *Alert) SetFocusable(b bool) { w.focusable = b }
func (w *Alert) WantW() int {
return 4 + wh.Max(w.message.WantW(), (w.btnOk.WantW()+w.btnCancel.WantW()))
}