A few tweaks

This commit is contained in:
2025-08-20 10:53:18 -05:00
parent 599554a798
commit 0374e89b4f
5 changed files with 208 additions and 177 deletions

View File

@@ -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