Work
This commit is contained in:
@@ -50,13 +50,14 @@ type Checkbox struct {
|
||||
var _ Widget = (*Checkbox)(nil)
|
||||
|
||||
func NewCheckbox(id string, style tcell.Style) *Checkbox {
|
||||
ret := &Checkbox{style: style}
|
||||
ret.Init(id)
|
||||
ret := &Checkbox{}
|
||||
ret.Init(id, style)
|
||||
return ret
|
||||
}
|
||||
|
||||
func (w *Checkbox) Init(id string) {
|
||||
func (w *Checkbox) Init(id string, style tcell.Style) {
|
||||
w.id = id
|
||||
w.style = style
|
||||
w.visible = true
|
||||
w.stateRunes = []rune{'X', ' ', '-'}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user