mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
Add Context::request_repaint_after (#1694)
This commit is contained in:
@@ -60,13 +60,17 @@ impl EguiGlium {
|
||||
/// Returns `true` if egui requests a repaint.
|
||||
///
|
||||
/// Call [`Self::paint`] later to paint.
|
||||
pub fn run(&mut self, display: &glium::Display, run_ui: impl FnMut(&egui::Context)) -> bool {
|
||||
pub fn run(
|
||||
&mut self,
|
||||
display: &glium::Display,
|
||||
run_ui: impl FnMut(&egui::Context),
|
||||
) -> std::time::Duration {
|
||||
let raw_input = self
|
||||
.egui_winit
|
||||
.take_egui_input(display.gl_window().window());
|
||||
let egui::FullOutput {
|
||||
platform_output,
|
||||
needs_repaint,
|
||||
repaint_after,
|
||||
textures_delta,
|
||||
shapes,
|
||||
} = self.egui_ctx.run(raw_input, run_ui);
|
||||
@@ -80,7 +84,7 @@ impl EguiGlium {
|
||||
self.shapes = shapes;
|
||||
self.textures_delta.append(textures_delta);
|
||||
|
||||
needs_repaint
|
||||
repaint_after
|
||||
}
|
||||
|
||||
/// Paint the results of the last call to [`Self::run`].
|
||||
|
||||
Reference in New Issue
Block a user