mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 23:13:13 -04:00
Rename every thing that i was implemented for multiples windows to Viewport
This commit is contained in:
@@ -21,8 +21,8 @@ fn main() -> Result<(), eframe::Error> {
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
ui.label(format!(
|
||||
"Current window: {}, Current rendering window: {}",
|
||||
ctx.current_window(),
|
||||
ctx.current_rendering_window()
|
||||
ctx.current_viewport(),
|
||||
ctx.current_rendering_viewport()
|
||||
));
|
||||
ui.heading("My egui Application");
|
||||
ui.horizontal(|ui| {
|
||||
@@ -42,8 +42,8 @@ fn main() -> Result<(), eframe::Error> {
|
||||
ui.checkbox(&mut window1_embedded, "Should embedd?");
|
||||
ui.label(format!(
|
||||
"Current window: {}, Current rendering window: {}",
|
||||
ctx.current_window(),
|
||||
ctx.current_rendering_window()
|
||||
ctx.current_viewport(),
|
||||
ctx.current_rendering_viewport()
|
||||
));
|
||||
});
|
||||
});
|
||||
@@ -54,8 +54,8 @@ fn main() -> Result<(), eframe::Error> {
|
||||
ui.checkbox(&mut window2_embedded, "Should embedd?");
|
||||
ui.label(format!(
|
||||
"Current window: {}, Current rendering window: {}",
|
||||
ctx.current_window(),
|
||||
ctx.current_rendering_window()
|
||||
ctx.current_viewport(),
|
||||
ctx.current_rendering_viewport()
|
||||
));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -128,6 +128,9 @@ impl eframe::App for Application {
|
||||
});
|
||||
});
|
||||
|
||||
ctx.request_repaint_after(Self::repaint_max_timeout(), ctx.current_rendering_window());
|
||||
ctx.request_repaint_after(
|
||||
Self::repaint_max_timeout(),
|
||||
ctx.current_rendering_viewport(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user