This commit is contained in:
Stanislav 2022-08-03 23:33:59 +03:00
parent fd9c8e5e08
commit de3897d836

View file

@ -52,12 +52,12 @@ pub trait App {
/// To force a repaint, call [`egui::Context::request_repaint`] at any time (e.g. from another thread).
fn update(&mut self, ctx: &egui::Context, frame: &mut Frame);
// Handle to the app.
//
// Can be used from web to interact or other external context
// Implementation is needed, because downcasting Box<dyn App> -> Box<dyn Any> to get &ConcreteApp is not simple in current rust.
//
// Just return &mut *self
/// Handle to the app.
///
/// Can be used from web to interact or other external context
/// Implementation is needed, because downcasting Box<dyn App> -> Box<dyn Any> to get &ConcreteApp is not simple in current rust.
///
/// Just return &mut *self
#[cfg(target_arch = "wasm32")]
fn as_any_mut(&mut self) -> &mut dyn Any;