mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 05:10:03 -04:00
improve documentation
This commit is contained in:
@@ -76,6 +76,12 @@ pub trait App {
|
||||
fn load(&mut self, _storage: &dyn Storage) {}
|
||||
|
||||
/// Called on shutdown, and perhaps at regular intervals. Allows you to save state.
|
||||
///
|
||||
/// On web the states is stored to "Local Storage".
|
||||
/// On native the path is picked using [`directories_next::ProjectDirs`](https://docs.rs/directories-next/latest/directories_next/struct.ProjectDirs.html) which is:
|
||||
/// * Linux: `/home/UserName/.config/appname`
|
||||
/// * macOS: `/Users/UserName/Library/Application Support/appname`
|
||||
/// * Windows: `C:\Users\UserName\AppData\Roaming\appname`
|
||||
fn save(&mut self, _storage: &mut dyn Storage) {}
|
||||
|
||||
/// Called once on shutdown (before or after `save()`)
|
||||
|
||||
Reference in New Issue
Block a user