update egui

This commit is contained in:
Simon Gardling
2022-05-25 10:43:30 -04:00
parent 167a104239
commit 3c224d9872
2 changed files with 18 additions and 11 deletions

View File

@@ -633,8 +633,19 @@ impl App for MathApp {
self.last_info.1 = start.map(|a| format!("Took: {:?}", a.elapsed()));
}
#[cfg(target_arch = "wasm32")]
fn save(&mut self, _: &mut dyn eframe::Storage) {
#[cfg(target_arch = "wasm32")]
self.save_functions();
}
fn clear_color(&self, _visuals: &egui::Visuals) -> egui::Rgba {
crate::style::STYLE.window_fill().into()
}
}
impl MathApp {
#[cfg(target_arch = "wasm32")]
fn save_functions(&self) {
tracing::info!("Saving function data");
let hash: crate::misc::HashBytes =
unsafe { std::mem::transmute::<&str, crate::misc::HashBytes>(build::SHORT_COMMIT) };
@@ -647,8 +658,4 @@ impl App for MathApp {
.set_item(FUNC_NAME, saved_data)
.expect("failed to set local function storage");
}
fn clear_color(&self, _visuals: &egui::Visuals) -> egui::Rgba {
crate::style::STYLE.window_fill().into()
}
}