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

12
Cargo.lock generated
View File

@@ -658,7 +658,7 @@ checksum = "453440c271cf5577fd2a40e4942540cb7d0d2f85e27c8d07dd0023c925a67541"
[[package]]
name = "eframe"
version = "0.18.0"
source = "git+https://github.com/Titaniumtown/egui.git#781eab1f563f17b3e20588184ce50ef85a6e6893"
source = "git+https://github.com/Titaniumtown/egui.git#2481889aadfab5622212f10a40035dab4af2e8f6"
dependencies = [
"bytemuck",
"egui",
@@ -678,7 +678,7 @@ dependencies = [
[[package]]
name = "egui"
version = "0.18.1"
source = "git+https://github.com/Titaniumtown/egui.git#781eab1f563f17b3e20588184ce50ef85a6e6893"
source = "git+https://github.com/Titaniumtown/egui.git#2481889aadfab5622212f10a40035dab4af2e8f6"
dependencies = [
"ahash",
"epaint",
@@ -690,7 +690,7 @@ dependencies = [
[[package]]
name = "egui-winit"
version = "0.18.0"
source = "git+https://github.com/Titaniumtown/egui.git#781eab1f563f17b3e20588184ce50ef85a6e6893"
source = "git+https://github.com/Titaniumtown/egui.git#2481889aadfab5622212f10a40035dab4af2e8f6"
dependencies = [
"arboard",
"egui",
@@ -704,7 +704,7 @@ dependencies = [
[[package]]
name = "egui_glow"
version = "0.18.1"
source = "git+https://github.com/Titaniumtown/egui.git#781eab1f563f17b3e20588184ce50ef85a6e6893"
source = "git+https://github.com/Titaniumtown/egui.git#2481889aadfab5622212f10a40035dab4af2e8f6"
dependencies = [
"bytemuck",
"egui",
@@ -724,7 +724,7 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
[[package]]
name = "emath"
version = "0.18.0"
source = "git+https://github.com/Titaniumtown/egui.git#781eab1f563f17b3e20588184ce50ef85a6e6893"
source = "git+https://github.com/Titaniumtown/egui.git#2481889aadfab5622212f10a40035dab4af2e8f6"
dependencies = [
"bytemuck",
"serde",
@@ -733,7 +733,7 @@ dependencies = [
[[package]]
name = "epaint"
version = "0.18.1"
source = "git+https://github.com/Titaniumtown/egui.git#781eab1f563f17b3e20588184ce50ef85a6e6893"
source = "git+https://github.com/Titaniumtown/egui.git#2481889aadfab5622212f10a40035dab4af2e8f6"
dependencies = [
"ab_glyph",
"ahash",

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()
}
}