mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40: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:
@@ -11,18 +11,18 @@ struct MyApp {
|
||||
}
|
||||
|
||||
impl egui::app::App for MyApp {
|
||||
/// This function will be called whenever the Ui needs to be shown,
|
||||
/// which may be many times per second.
|
||||
/// Called each time the UI needs repainting, which may be many times per second.
|
||||
/// Put your widgets into a `SidePanel`, `TopPanel`, `Window` or into `ctx.background_ui()`.
|
||||
fn ui(
|
||||
&mut self,
|
||||
ui: &mut egui::Ui,
|
||||
ctx: &std::sync::Arc<egui::Context>,
|
||||
_info: &egui::app::BackendInfo,
|
||||
_tex_allocator: Option<&mut dyn egui::app::TextureAllocator>,
|
||||
) -> egui::app::AppOutput {
|
||||
let MyApp { my_string, value } = self;
|
||||
|
||||
// Example used in `README.md`.
|
||||
egui::Window::new("Debug").show(ui.ctx(), |ui| {
|
||||
egui::Window::new("Debug").show(ctx, |ui| {
|
||||
ui.label(format!("Hello, world {}", 123));
|
||||
if ui.button("Save").clicked {
|
||||
my_save_function();
|
||||
|
||||
Reference in New Issue
Block a user