mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 21:30:03 -04:00
Put everything in Context behind the same Mutex (#1050)
* Move all interior mutability from Context to CtxRef and make it a handle * Rename `CtxRef` to `Context` * The old `Context` is now `ContextImpl` and is non-pub * Add benchmark Painter::rect Co-authored-by: Daniel Keller <dklr433@gmail.com>
This commit is contained in:
@@ -19,7 +19,7 @@ impl epi::App for MyApp {
|
||||
|
||||
fn setup(
|
||||
&mut self,
|
||||
ctx: &egui::CtxRef,
|
||||
ctx: &egui::Context,
|
||||
_frame: &epi::Frame,
|
||||
_storage: Option<&dyn epi::Storage>,
|
||||
) {
|
||||
@@ -51,7 +51,7 @@ impl epi::App for MyApp {
|
||||
ctx.set_fonts(fonts);
|
||||
}
|
||||
|
||||
fn update(&mut self, ctx: &egui::CtxRef, _frame: &epi::Frame) {
|
||||
fn update(&mut self, ctx: &egui::Context, _frame: &epi::Frame) {
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
ui.heading("egui using custom fonts");
|
||||
ui.text_edit_multiline(&mut self.text);
|
||||
|
||||
Reference in New Issue
Block a user