Call OnMenuPress(nil) when hitting esc in a menu

OnMenuPress can already deal with the selected item being nil, so this allows us
to add common code to it that is run when cancelling the menu.
This commit is contained in:
Stefan Haller
2026-04-01 09:13:55 +02:00
parent 2ab78ad039
commit 7a0320b4ec
+1 -2
View File
@@ -78,8 +78,7 @@ func (self *MenuController) close() error {
return nil
}
self.c.Context().Pop()
return nil
return self.context().OnMenuPress(nil)
}
func (self *MenuController) context() *context.MenuContext {