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

Add a dummy warm-up frame to the demo app to pre-cache emojis

This commit is contained in:
Emil Ernerfeldt
2021-01-02 14:42:43 +01:00
parent 4202c4b6a9
commit 14a96ca5d0
14 changed files with 144 additions and 55 deletions

View File

@@ -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) {}