mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 15:13:12 -04:00
Now viewports will be identified by there id a normal egui::Id
Before viewports was identified by there title
This commit is contained in:
@@ -63,7 +63,7 @@ impl eframe::App for App {
|
||||
if self.show_async_viewport {
|
||||
let state = self.async_viewport_state.clone();
|
||||
ctx.create_viewport(
|
||||
ViewportBuilder::default().with_title("Async Viewport"),
|
||||
ViewportBuilder::new("Async Viewport").with_title("Async Viewport"),
|
||||
move |ctx| {
|
||||
let mut state = state.write().unwrap();
|
||||
let content = |ui: &mut egui::Ui| {
|
||||
@@ -96,7 +96,7 @@ impl eframe::App for App {
|
||||
// Showing Sync Viewport
|
||||
if self.show_sync_viewport {
|
||||
ctx.create_viewport_sync(
|
||||
ViewportBuilder::default().with_title("Sync Viewport"),
|
||||
ViewportBuilder::new("Sync Viewport").with_title("Sync Viewport"),
|
||||
|ctx| {
|
||||
let content = |ui: &mut egui::Ui| {
|
||||
ui.label(format!("Frame: {}", ctx.frame_nr()));
|
||||
|
||||
Reference in New Issue
Block a user