Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting where to save app #2

Open
willser opened this issue Apr 25, 2022 · 0 comments
Open

Selecting where to save app #2

willser opened this issue Apr 25, 2022 · 0 comments
Labels
blocked Blocked by something enhancement New feature or request

Comments

@willser
Copy link
Owner

willser commented Apr 25, 2022

egui use directories_next store data.This is docs about directories_next.
One way to app could selecting where to save data is following this issue emilk/egui#914 .

Other way is rewrite following code

weaver/src/main.rs

Lines 134 to 147 in 9e097f3

fn setup(
&mut self,
ctx: &egui::Context,
_frame: &epi::Frame,
storage: Option<&dyn epi::Storage>,
) {
// Load previous app state (if any).
if let Some(storage) = storage {
// TODO change key in feature
*self = epi::get_value(storage, epi::APP_KEY).unwrap_or_default();
}
// Init font after load data from local
self.settings.local_settings(ctx);
}

It is worth noting that those code just work in write data to hd.

@willser willser added enhancement New feature or request blocked Blocked by something labels Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked by something enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant