pub struct GUI { /* private fields */ }Expand description
Integration of egui, an immediate mode GUI.
Implementations
sourceimpl GUI
impl GUI
sourcepub fn new(context: &Context) -> ThreeDResult<Self>
Available on crate feature egui-gui only.
pub fn new(context: &Context) -> ThreeDResult<Self>
egui-gui only.Creates a new GUI.
sourcepub fn update<F: FnOnce(&CtxRef)>(
&mut self,
frame_input: &mut FrameInput,
callback: F
) -> ThreeDResult<bool>
Available on crate feature egui-gui only.
pub fn update<F: FnOnce(&CtxRef)>(
&mut self,
frame_input: &mut FrameInput,
callback: F
) -> ThreeDResult<bool>
egui-gui only.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.
sourcepub fn render(&mut self) -> ThreeDResult<()>
Available on crate feature egui-gui only.
pub fn render(&mut self) -> ThreeDResult<()>
egui-gui only.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 !Send for GUI
impl !Sync for GUI
impl Unpin for GUI
impl !UnwindSafe for GUI
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more