Struct three_d::GUI [−][src]
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]
&mut self,
frame_input: &mut FrameInput,
callback: F
) -> Result<bool, Error>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,