1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00
This commit is contained in:
Konkitoman
2023-09-01 11:52:00 +03:00
parent 52a63cabf9
commit 661120dc1d
28 changed files with 112 additions and 339 deletions

View File

@@ -32,19 +32,7 @@ pub struct App {
}
impl eframe::App for App {
fn update(
&mut self,
ctx: &egui::Context,
_frame: &mut eframe::Frame,
render_function: Option<&egui::ViewportRender>,
) {
// This needs to be like this to be able to show stuf on a async viewport
if let Some(render) = render_function {
// This is the render function for the current async viewport
render(ctx);
return;
}
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
egui::CentralPanel::default().show(ctx, |ui| {
ui_info(ui);
ui.label("Look at the \"Frame: \" will tell you, what viewport is rendering!");