Struct three_d::GUI[][src]

pub struct GUI { /* fields omitted */ }

Integration of egui, an immediate mode GUI.

Implementations

impl GUI[src]

pub fn new(context: &Context) -> Result<Self, Error>[src]

Creates a new GUI.

pub fn update<F: FnOnce(&CtxRef)>(
    &mut self,
    frame_input: &mut FrameInput,
    callback: F
) -> Result<bool, Error>
[src]

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.

pub fn render(&mut self) -> Result<(), Error>[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.