Add SetStyle Function
This commit is contained in:
@@ -114,23 +114,24 @@ func (w *Prompt) Draw(screen tcell.Screen) {
|
||||
w.GetPos().DrawOffset(w.btnCancel, screen)
|
||||
}
|
||||
|
||||
func (w *Prompt) Active() bool { return w.active }
|
||||
func (w *Prompt) SetActive(a bool) { w.active = a }
|
||||
func (w *Prompt) Visible() bool { return w.visible }
|
||||
func (w *Prompt) SetVisible(a bool) { w.visible = a }
|
||||
func (w *Prompt) SetX(x int) { w.x = x }
|
||||
func (w *Prompt) SetY(y int) { w.y = y }
|
||||
func (w *Prompt) GetX() int { return w.x }
|
||||
func (w *Prompt) GetY() int { return w.y }
|
||||
func (w *Prompt) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
|
||||
func (w *Prompt) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
|
||||
func (w *Prompt) SetW(x int) { w.w = x }
|
||||
func (w *Prompt) SetH(y int) { w.h = y }
|
||||
func (w *Prompt) GetW() int { return w.w }
|
||||
func (w *Prompt) GetH() int { return w.y }
|
||||
func (w *Prompt) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
|
||||
func (w *Prompt) Focusable() bool { return w.focusable }
|
||||
func (w *Prompt) SetFocusable(b bool) { w.focusable = b }
|
||||
func (w *Prompt) SetStyle(s tcell.Style) { w.style = s }
|
||||
func (w *Prompt) Active() bool { return w.active }
|
||||
func (w *Prompt) SetActive(a bool) { w.active = a }
|
||||
func (w *Prompt) Visible() bool { return w.visible }
|
||||
func (w *Prompt) SetVisible(a bool) { w.visible = a }
|
||||
func (w *Prompt) SetX(x int) { w.x = x }
|
||||
func (w *Prompt) SetY(y int) { w.y = y }
|
||||
func (w *Prompt) GetX() int { return w.x }
|
||||
func (w *Prompt) GetY() int { return w.y }
|
||||
func (w *Prompt) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
|
||||
func (w *Prompt) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
|
||||
func (w *Prompt) SetW(x int) { w.w = x }
|
||||
func (w *Prompt) SetH(y int) { w.h = y }
|
||||
func (w *Prompt) GetW() int { return w.w }
|
||||
func (w *Prompt) GetH() int { return w.y }
|
||||
func (w *Prompt) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
|
||||
func (w *Prompt) Focusable() bool { return w.focusable }
|
||||
func (w *Prompt) SetFocusable(b bool) { w.focusable = b }
|
||||
func (w *Prompt) WantW() int {
|
||||
return w.btnOk.WantW() + w.btnCancel.WantW() + 4
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user