Module egui::menu [−][src]
Expand description
Menu bar functionality (very basic so far).
Usage:
fn show_menu(ui: &mut egui::Ui) { use egui::{menu, Button}; menu::bar(ui, |ui| { menu::menu(ui, "File", |ui| { if ui.button("Open").clicked() { // ... } }); }); }
Functions
The menu bar goes well in a TopBottomPanel::top
,
but can also be placed in a Window
.
In the latter case you may want to wrap it in Frame
.
Construct a top level menu in a menu bar. This would be e.g. “File”, “Edit” etc.