Struct three_d::GUI [−][src]
pub struct GUI { /* fields omitted */ }
Expand description
Integration of egui, an immediate mode GUI.
Implementations
Creates a new GUI.
pub fn update<F: FnOnce(&CtxRef)>(
&mut self,
frame_input: &mut FrameInput,
callback: F
) -> ThreeDResult<bool>
pub fn update<F: FnOnce(&CtxRef)>(
&mut self,
frame_input: &mut FrameInput,
callback: F
) -> ThreeDResult<bool>
Initialises a new frame of the GUI and handles events. Construct the GUI (Add panels, widgets etc.) using the egui::CtxRef 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.
Render the GUI defined in the update function. Must be called in a render target render function, for example in the callback function of Screen::write.
Auto Trait Implementations
impl !RefUnwindSafe for GUI
impl !UnwindSafe for GUI
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more