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

@@ -121,23 +121,24 @@ func (w *FilePicker) Draw(screen tcell.Screen) {
p.DrawOffset(w.btnSelect, screen)
}
func (w *FilePicker) Active() bool { return w.active }
func (w *FilePicker) SetActive(a bool) { w.active = a }
func (w *FilePicker) Visible() bool { return w.visible }
func (w *FilePicker) SetVisible(a bool) { w.visible = a }
func (w *FilePicker) SetX(x int) { w.x = x }
func (w *FilePicker) SetY(y int) { w.y = y }
func (w *FilePicker) GetX() int { return w.x }
func (w *FilePicker) GetY() int { return w.y }
func (w *FilePicker) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
func (w *FilePicker) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
func (w *FilePicker) SetW(x int) { w.w = x }
func (w *FilePicker) SetH(y int) { w.h = y }
func (w *FilePicker) GetW() int { return w.w }
func (w *FilePicker) GetH() int { return w.y }
func (w *FilePicker) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
func (w *FilePicker) Focusable() bool { return w.focusable }
func (w *FilePicker) SetFocusable(b bool) { w.focusable = b }
func (w *FilePicker) SetStyle(s tcell.Style) { w.style = s }
func (w *FilePicker) Active() bool { return w.active }
func (w *FilePicker) SetActive(a bool) { w.active = a }
func (w *FilePicker) Visible() bool { return w.visible }
func (w *FilePicker) SetVisible(a bool) { w.visible = a }
func (w *FilePicker) SetX(x int) { w.x = x }
func (w *FilePicker) SetY(y int) { w.y = y }
func (w *FilePicker) GetX() int { return w.x }
func (w *FilePicker) GetY() int { return w.y }
func (w *FilePicker) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
func (w *FilePicker) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
func (w *FilePicker) SetW(x int) { w.w = x }
func (w *FilePicker) SetH(y int) { w.h = y }
func (w *FilePicker) GetW() int { return w.w }
func (w *FilePicker) GetH() int { return w.y }
func (w *FilePicker) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
func (w *FilePicker) Focusable() bool { return w.focusable }
func (w *FilePicker) SetFocusable(b bool) { w.focusable = b }
func (w *FilePicker) WantW() int {
// borders + the greater of the buttons next to each other or the list width
return wh.Max((w.btnSelect.WantW()+w.btnCancel.WantW()), w.fileList.WantW()) + 2