Replies: 3 comments
-
|
The menu button uses a As for the other question, I'm not sure I understand why you have a problem with the impl eframe::App for MyApp {
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
egui::CentralPanel::default()
.show(ctx, |_| {})
.response
.context_menu(|ui| {
ui.menu_button("Menu1", |ui| {
ui.menu_button("Submenu 1", |ui| {
if ui.button("Close").clicked() {
ui.close_menu();
}
})
});
});
}
} |
Beta Was this translation helpful? Give feedback.
-
|
I see and that will be basically an invisible panel. Thank you, will try! |
Beta Was this translation helpful? Give feedback.
-
|
I can't seem to get the CentralPanel to sense clicks on it. I had to do the following to get it to be invisible (by default it's gray and fills the screen): However, I still can't figure out how |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I'm trying to open a contextual menu at a random location in my program wheneve I right click somewhere (not on an egui element).
I'm using this code:
coordsis the place I detected the right-click.However, the buttons look like this:
So there are a few things I don't understand:
?charactersResponseand I got a bit confused by that.:I've pointed my project to egui main branch.
Tried both
PopupKind::MenuandPopupKind::Popupwith no successBeta Was this translation helpful? Give feedback.
All reactions