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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user