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

Context::begin_frame() no longer returns anything.

Put your widgets into a `SidePanel`, `TopPanel`,
`Window` or into `ctx.background_ui()`.
This commit is contained in:
Emil Ernerfeldt
2020-10-24 10:56:23 +02:00
parent f86cb4a923
commit 44a7cac046
11 changed files with 54 additions and 37 deletions

View File

@@ -33,8 +33,7 @@ impl WebBackend {
self.painter.canvas_id()
}
/// Returns a master fullscreen UI, covering the entire screen.
pub fn begin_frame(&mut self, raw_input: egui::RawInput) -> egui::Ui {
pub fn begin_frame(&mut self, raw_input: egui::RawInput) {
self.frame_start = Some(now_sec());
self.ctx.begin_frame(raw_input)
}
@@ -161,10 +160,11 @@ impl AppRunner {
native_pixels_per_point: Some(native_pixels_per_point()),
};
let mut ui = self.web_backend.begin_frame(raw_input);
self.web_backend.begin_frame(raw_input);
let egui_ctx = &self.web_backend.ctx;
let app_output = self
.app
.ui(&mut ui, &backend_info, Some(&mut self.web_backend.painter));
.ui(egui_ctx, &backend_info, Some(&mut self.web_backend.painter));
let (egui_output, paint_jobs) = self.web_backend.end_frame()?;
handle_output(&egui_output);