mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Add a dummy warm-up frame to the demo app to pre-cache emojis
This commit is contained in:
@@ -64,6 +64,14 @@ pub trait App {
|
||||
/// Optional.
|
||||
fn setup(&mut self, _ctx: &egui::CtxRef) {}
|
||||
|
||||
/// If `true` a warm-up call to [`Self::update`] will be issued where
|
||||
/// `ctx.memory().everything_is_visible()` will be set to `true`.
|
||||
///
|
||||
/// In this warm-up call, all paint commands will be ignored.
|
||||
fn warm_up_enabled(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
/// Called once on start. Allows you to restore state.
|
||||
fn load(&mut self, _storage: &dyn Storage) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user