Improve demo backend panel
This commit is contained in:
parent
96bc34a66d
commit
6a8b51adb5
|
|
@ -93,11 +93,12 @@ impl BackendPanel {
|
|||
ui.label("egui windows:");
|
||||
self.egui_windows.checkboxes(ui);
|
||||
|
||||
ui.separator();
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
if ui.ctx().style().debug.debug_on_hover_with_all_modifiers {
|
||||
ui.label("Press down all modifiers and hover a widget to see a callstack for it");
|
||||
{
|
||||
ui.separator();
|
||||
if ui.ctx().style().debug.debug_on_hover_with_all_modifiers {
|
||||
ui.label("Press down all modifiers and hover a widget to see a callstack for it");
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
|
|
@ -109,14 +110,6 @@ impl BackendPanel {
|
|||
ui.ctx().options_mut(|o| o.screen_reader = screen_reader);
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
{
|
||||
ui.separator();
|
||||
if ui.button("Quit").clicked() {
|
||||
ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close);
|
||||
}
|
||||
}
|
||||
|
||||
if cfg!(debug_assertions) && cfg!(target_arch = "wasm32") {
|
||||
ui.separator();
|
||||
// For testing panic handling on web:
|
||||
|
|
@ -125,6 +118,13 @@ impl BackendPanel {
|
|||
panic!("intentional panic!");
|
||||
}
|
||||
}
|
||||
|
||||
if !cfg!(target_arch = "wasm32") {
|
||||
ui.separator();
|
||||
if ui.button("Quit").clicked() {
|
||||
ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn run_mode_ui(&mut self, ui: &mut egui::Ui) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue