1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

* Now: is_desktop can only be set at the creation with egui::Context::new insted of default!

* Removed: egui::Context::is_desktop, egui::Context::set_desktop
* Added: egui::Context::force_embedding, egui::Context::set_force_embedding
This commit is contained in:
Konkitoman
2023-08-22 09:39:41 +03:00
parent 2919a325d9
commit 013f01dbcb
7 changed files with 42 additions and 25 deletions

View File

@@ -48,9 +48,9 @@ impl eframe::App for App {
ui.label(format!("Size: {:?}", ctx.screen_rect().max));
ui.label("Look at the \"Frame: \" will tell you, what viewport is rendering!");
{
let mut desktop = ctx.is_desktop();
ui.checkbox(&mut desktop, "Desktop");
ctx.set_desktop(desktop);
let mut force_embedding = ctx.force_embedding();
ui.checkbox(&mut force_embedding, "Force embedding!");
ctx.set_force_embedding(force_embedding);
}
ui.checkbox(&mut self.show_async_viewport, "Show Async Viewport");
ui.checkbox(&mut self.show_sync_viewport, "Show Sync Viewport");