pub fn show(
ctx: &Context,
state: &mut MenuState,
home: Pos2,
views: &[(String, bool)],
enabled: impl Fn(Command) -> bool,
) -> Option<Command>Expand description
Draw the menu and return the command picked this frame, if any. views
fills the View submenu as (name, is_current); picking the n-th returns
Command::OpenView(n). enabled greys out commands that can’t run now.
The menu’s top-left starts at home; after that it stays where it’s dragged.