pub struct GUI { /* private fields */ }Available on crate feature
egui-gui only.Expand description
Integration of egui, an immediate mode GUI.
Implementations§
source§impl GUI
impl GUI
sourcepub fn from_gl_context(context: Arc<Context>) -> Self
pub fn from_gl_context(context: Arc<Context>) -> Self
Creates a new GUI from a low-level graphics Context.
sourcepub fn update(
&mut self,
events: &mut [Event],
accumulated_time_in_ms: f64,
viewport: Viewport,
device_pixel_ratio: f32,
callback: impl FnOnce(&Context)
) -> bool
pub fn update( &mut self, events: &mut [Event], accumulated_time_in_ms: f64, viewport: Viewport, device_pixel_ratio: f32, callback: impl FnOnce(&Context) ) -> bool
Initialises a new frame of the GUI and handles events. Construct the GUI (Add panels, widgets etc.) using the egui::Context in the callback function. This function returns whether or not the GUI has changed, ie. if it consumes any events, and therefore needs to be rendered again.
sourcepub fn render(&self)
pub fn render(&self)
Render the GUI defined in the update function. Must be called in the callback given as input to a RenderTarget, ColorTarget or DepthTarget write method.
Auto Trait Implementations§
impl !RefUnwindSafe for GUI
impl Send for GUI
impl !Sync for GUI
impl Unpin for GUI
impl !UnwindSafe for GUI
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more