pub struct InputState {Show 18 fields
pub mouse_x: f32,
pub mouse_y: f32,
pub mouse_dx: f32,
pub mouse_dy: f32,
pub l_button: bool,
pub m_button: bool,
pub r_button: bool,
pub l_pressed: bool,
pub l_released: bool,
pub l_click_count: i32,
pub scroll_x: f32,
pub scroll_y: f32,
pub modifiers: InputModifiers,
pub pointer_down: bool,
pub pointer_x: f32,
pub pointer_y: f32,
pub shift: bool,
pub ctrl: bool,
}Expand description
Stable per-frame pointer and modifier snapshot. Donor: oa/ui/event.h.
Fields§
§mouse_x: f32§mouse_y: f32§mouse_dx: f32§mouse_dy: f32§l_pressed: boolTrue on the exact frame the left button transitioned down.
l_released: boolTrue on the exact frame the left button transitioned up.
l_click_count: i32§scroll_x: f32§scroll_y: f32§modifiers: InputModifiers§pointer_down: boolAlias for l_button (legacy API used by current widget code).
pointer_x: f32§pointer_y: f32§shift: bool§ctrl: boolImplementations§
Source§impl InputState
impl InputState
pub const EMPTY: InputState
Trait Implementations§
Source§impl Clone for InputState
impl Clone for InputState
Source§impl Debug for InputState
impl Debug for InputState
Auto Trait Implementations§
impl Forget for InputState
impl Freeze for InputState
impl Move for InputState
impl RefUnwindSafe for InputState
impl Send for InputState
impl Sync for InputState
impl Unpin for InputState
impl UnsafeUnpin for InputState
impl UnwindSafe for InputState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more