1
0
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:
Konkitoman
2023-07-23 12:47:36 +03:00
parent cf01eff8d1
commit ea2dcd8cb5
10 changed files with 82 additions and 76 deletions

View File

@@ -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()
));
});
});

View File

@@ -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(),
);
}
}