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

[app] Simplify interface to egui::app::App

This commit is contained in:
Emil Ernerfeldt
2020-10-24 19:23:16 +02:00
parent daa7a2bdb2
commit 7638ca9962
9 changed files with 66 additions and 56 deletions

View File

@@ -16,9 +16,8 @@ impl egui::app::App for MyApp {
fn ui(
&mut self,
ctx: &std::sync::Arc<egui::Context>,
_info: &egui::app::BackendInfo,
_tex_allocator: Option<&mut dyn egui::app::TextureAllocator>,
) -> egui::app::AppOutput {
_integration_context: &mut egui::app::IntegrationContext,
) {
let MyApp { my_string, value } = self;
// Example used in `README.md`.
@@ -30,8 +29,6 @@ impl egui::app::App for MyApp {
ui.text_edit(my_string);
ui.add(egui::Slider::f32(value, 0.0..=1.0).text("float"));
});
Default::default()
}
fn on_exit(&mut self, storage: &mut dyn egui::app::Storage) {