mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 14:50:03 -04:00
Call logic even while browser tab is in background (#8257)
* Closes https://github.com/emilk/egui/issues/5112 --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,11 @@ pub(crate) fn seconds_since_midnight() -> f64 {
|
||||
pub trait DemoApp {
|
||||
fn demo_ui(&mut self, ui: &mut egui::Ui, frame: &mut eframe::Frame);
|
||||
|
||||
/// Run background logic, called every frame even when the app is hidden.
|
||||
///
|
||||
/// See [`eframe::App::logic`].
|
||||
fn logic(&mut self, _ctx: &egui::Context) {}
|
||||
|
||||
#[cfg(feature = "glow")]
|
||||
fn on_exit(&mut self, _gl: Option<&eframe::glow::Context>) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user