Add SetStyle Function
This commit is contained in:
@@ -155,20 +155,21 @@ func (w *Field) Draw(screen tcell.Screen) {
|
||||
wh.DrawText(x, w.y, post, valueStyle, screen)
|
||||
}
|
||||
|
||||
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 }
|
||||
func (w *Field) SetVisible(a bool) { w.visible = a }
|
||||
func (w *Field) SetX(x int) { w.x = x }
|
||||
func (w *Field) SetY(y int) { w.y = y }
|
||||
func (w *Field) GetX() int { return w.x }
|
||||
func (w *Field) GetY() int { return w.y }
|
||||
func (w *Field) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
|
||||
func (w *Field) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
|
||||
func (w *Field) SetW(wd int) { w.w = wd }
|
||||
func (w *Field) SetH(h int) { w.h = h }
|
||||
func (w *Field) GetW() int { return w.w }
|
||||
func (w *Field) GetH() int { return w.h }
|
||||
func (w *Field) SetStyle(s tcell.Style) { w.style = s }
|
||||
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 }
|
||||
func (w *Field) SetVisible(a bool) { w.visible = a }
|
||||
func (w *Field) SetX(x int) { w.x = x }
|
||||
func (w *Field) SetY(y int) { w.y = y }
|
||||
func (w *Field) GetX() int { return w.x }
|
||||
func (w *Field) GetY() int { return w.y }
|
||||
func (w *Field) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
|
||||
func (w *Field) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
|
||||
func (w *Field) SetW(wd int) { w.w = wd }
|
||||
func (w *Field) SetH(h int) { w.h = h }
|
||||
func (w *Field) GetW() int { return w.w }
|
||||
func (w *Field) GetH() int { return w.h }
|
||||
func (w *Field) WantW() int {
|
||||
vM := wh.Max(40, len(w.value))
|
||||
if len(w.label) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user