1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -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

@@ -147,8 +147,8 @@ let mut egui_ctx = egui::Context::new();
// Game loop:
loop {
let raw_input: egui::RawInput = my_integration.gather_input();
let mut ui = egui_ctx.begin_frame(raw_input);
my_app.ui(&mut ui); // add windows and widgets to `ui` here
egui_ctx.begin_frame(raw_input);
my_app.ui(&mut egui_ctx); // add panels, windows and widgets to `egui_ctx` here
let (output, paint_jobs) = egui_ctx.end_frame();
my_integration.paint(paint_jobs);
my_integration.set_cursor_icon(output.cursor_icon);