A few tweaks
This commit is contained in:
@@ -57,6 +57,7 @@ func (w *TopMenuLayout) Init(id string, s tcell.Style) {
|
||||
w.id = id
|
||||
w.style = s
|
||||
w.visible = true
|
||||
w.SetActive(true)
|
||||
|
||||
w.menu = NewMenu(fmt.Sprintf("%s.mainmenu", id), tcell.StyleDefault)
|
||||
w.menu.SetActive(false)
|
||||
@@ -97,7 +98,9 @@ func (w *TopMenuLayout) HandleKey(ev *tcell.EventKey) bool {
|
||||
|
||||
// Pass the key through to the main widget
|
||||
if w.widget != nil {
|
||||
w.Log(" Passing Key to Main Widget")
|
||||
// If we're here, that means the menu isn't active, but we are. So the
|
||||
// widget should be.
|
||||
w.widget.SetActive(true)
|
||||
return w.widget.HandleKey(ev)
|
||||
}
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user