[−][src]Struct volition::Input
struct for abstracting the state for all the inputs
Fields
mouse_pos: (f32, f32)
The position of the mouse
mouse_delta: (f32, f32)
The difference in mouse position from the last frame
raw_mouse_delta: (f32, f32)
The raw difference in mouse position from the last frame
mouse_axis_motion: (f32, f32)
The mouse axis motion for the last frame
mouse_wheel_delta: (f32, f32)
The difference in position of the mouse when from the previous frame
keys_down: Vec<Key>
The keys that are currently pressed down
keys_pressed: Vec<Key>
The keys that have been pressed on this frame
keys_released: Vec<Key>
The keys that have been released on this frame
characters_down: Vec<char>
Characters received that are pressed down
mouse_btns_down: Vec<MouseButton>
The mouse buttons that are currently pressed down
mouse_btns_pressed: Vec<MouseButton>
The mouse buttons that have been pressed down on this frame
mouse_btns_released: Vec<MouseButton>
The mouse buttons that have been release on this frame
hide_mouse: bool
Whether to show or hide the mouse
Implementations
impl Input
[src]
pub fn new() -> Input
[src]
Creates a new Input instance
pub fn update_inputs(&mut self, window: &Window, events: &Vec<Event<'_, ()>>)
[src]
This method updates the state of the inputs
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnwindSafe for Input
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,
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.
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>,