mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
[egui_glium] Your app state will auto-save to a good directory
Directory found with https://docs.rs/directories-next/2.0.0/directories_next/struct.ProjectDirs.html#method.data_dir
This commit is contained in:
@@ -3,12 +3,6 @@
|
||||
#![warn(clippy::all)]
|
||||
|
||||
fn main() {
|
||||
// Persist app state to file:
|
||||
let storage = egui_glium::storage::FileStorage::from_path(".egui_demo_glium.json");
|
||||
|
||||
// Alternative: store nowhere
|
||||
// let storage = egui::app::DummyStorage::default();
|
||||
|
||||
let app: egui::DemoApp = egui::app::get_value(&storage, egui::app::APP_KEY).unwrap_or_default();
|
||||
egui_glium::run(Box::new(storage), Box::new(app));
|
||||
let app = egui::DemoApp::default();
|
||||
egui_glium::run(Box::new(app));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user