Struct egui_miniquad::EguiMq[][src]

pub struct EguiMq { /* fields omitted */ }

egui bindings for miniquad.

Implementations

impl EguiMq[src]

pub fn new(mq_ctx: &mut Context) -> Self[src]

pub fn egui_ctx(&self) -> &CtxRef[src]

Use this to open egui windows, panels etc. Can only be used between Self::begin_frame and Self::end_frame.

pub fn begin_frame(&mut self, mq_ctx: &mut Context)[src]

Call this at the start of each draw call.

pub fn end_frame(&mut self, mq_ctx: &mut Context)[src]

Call this at the end of each draw call. This will draw the egui interface.

pub fn draw(&mut self, mq_ctx: &mut Context)[src]

Call this when you need to draw egui. Must be called after end_frame.

pub fn mouse_motion_event(&mut self, ctx: &mut Context, x: f32, y: f32)[src]

Call from your miniquad::EventHandler.

pub fn mouse_wheel_event(&mut self, ctx: &mut Context, dx: f32, dy: f32)[src]

Call from your miniquad::EventHandler.

pub fn mouse_button_down_event(
    &mut self,
    ctx: &mut Context,
    mb: MouseButton,
    x: f32,
    y: f32
)
[src]

Call from your miniquad::EventHandler.

pub fn mouse_button_up_event(
    &mut self,
    ctx: &mut Context,
    mb: MouseButton,
    x: f32,
    y: f32
)
[src]

Call from your miniquad::EventHandler.

pub fn char_event(&mut self, chr: char)[src]

Call from your miniquad::EventHandler.

pub fn key_down_event(
    &mut self,
    mq_ctx: &mut Context,
    keycode: KeyCode,
    keymods: KeyMods
)
[src]

Call from your miniquad::EventHandler.

pub fn key_up_event(&mut self, keycode: KeyCode, keymods: KeyMods)[src]

Call from your miniquad::EventHandler.

Auto Trait Implementations

impl !RefUnwindSafe for EguiMq

impl Send for EguiMq

impl Sync for EguiMq

impl Unpin for EguiMq

impl !UnwindSafe for EguiMq

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.