Work
This commit is contained in:
10
menu.go
10
menu.go
@@ -51,15 +51,17 @@ const (
|
||||
)
|
||||
|
||||
func NewMenu(id string, style tcell.Style) *Menu {
|
||||
ret := &Menu{style: style}
|
||||
ret.Init(id)
|
||||
ret := &Menu{}
|
||||
ret.Init(id, style)
|
||||
return ret
|
||||
}
|
||||
func (w *Menu) Id() string { return w.id }
|
||||
func (w *Menu) Init(id string) {
|
||||
|
||||
func (w *Menu) Init(id string, style tcell.Style) {
|
||||
w.id = id
|
||||
w.style = style
|
||||
w.visible = true
|
||||
}
|
||||
func (w *Menu) Id() string { return w.id }
|
||||
func (w *Menu) HandleResize(ev *tcell.EventResize) {}
|
||||
func (w *Menu) HandleKey(ev *tcell.EventKey) bool {
|
||||
if !w.active {
|
||||
|
||||
Reference in New Issue
Block a user