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

Replace Arc<Context> with struct CtxRef

This commit is contained in:
Emil Ernerfeldt
2020-12-19 14:48:04 +01:00
parent ce0ea74c9f
commit 01c65b0dcb
24 changed files with 286 additions and 300 deletions

View File

@@ -72,7 +72,7 @@ pub fn run(mut storage: Box<dyn egui::app::Storage>, mut app: Box<dyn App>) -> !
let repaint_signal = std::sync::Arc::new(GliumRepaintSignal(event_loop.create_proxy()));
let mut ctx = egui::Context::new();
let mut ctx = egui::CtxRef::default();
*ctx.memory() = egui::app::get_value(storage.as_ref(), EGUI_MEMORY_KEY).unwrap_or_default();
app.setup(&ctx);