Work
This commit is contained in:
@@ -45,13 +45,14 @@ type Button struct {
|
||||
var _ Widget = (*Button)(nil)
|
||||
|
||||
func NewButton(id string, style tcell.Style) *Button {
|
||||
b := &Button{style: style}
|
||||
b.Init(id)
|
||||
b := &Button{}
|
||||
b.Init(id, style)
|
||||
return b
|
||||
}
|
||||
|
||||
func (w *Button) Init(id string) {
|
||||
func (w *Button) Init(id string, style tcell.Style) {
|
||||
w.id = id
|
||||
w.style = style
|
||||
w.visible = true
|
||||
w.onPressed = func() bool { return false }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user