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

improve documentation

This commit is contained in:
Emil Ernerfeldt
2021-02-28 18:53:45 +01:00
parent 8be37b3d6c
commit fdb1aa6bec
10 changed files with 151 additions and 44 deletions

View File

@@ -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()`)