mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Box the app creator (#1373)
This commit is contained in:
@@ -101,7 +101,7 @@ use std::sync::{Arc, Mutex};
|
||||
/// The is is how your app is created.
|
||||
///
|
||||
/// You can use the [`CreationContext`] to setup egui, restore state, setup OpenGL things, etc.
|
||||
pub type AppCreator = fn(&CreationContext<'_>) -> Box<dyn App>;
|
||||
pub type AppCreator = Box<dyn FnOnce(&CreationContext<'_>) -> Box<dyn App>>;
|
||||
|
||||
/// Data that is passed to [`AppCreator`] that can be used to setup and initialize your app.
|
||||
pub struct CreationContext<'s> {
|
||||
|
||||
Reference in New Issue
Block a user