Struct egui_miniquad::EguiMq [−][src]
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]
&mut self,
ctx: &mut Context,
mb: MouseButton,
x: f32,
y: f32
)
Call from your miniquad::EventHandler
.
pub fn mouse_button_up_event(
&mut self,
ctx: &mut Context,
mb: MouseButton,
x: f32,
y: f32
)
[src]
&mut self,
ctx: &mut Context,
mb: MouseButton,
x: f32,
y: f32
)
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]
&mut self,
mq_ctx: &mut Context,
keycode: KeyCode,
keymods: KeyMods
)
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]
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>,