Struct crayon::input::InputSystemShared
[−]
[src]
pub struct InputSystemShared { /* fields omitted */ }
The multi-thread friendly APIs of InputSystem
.
Methods
impl InputSystemShared
[src]
pub fn has_keyboard_attached(&self) -> bool
[src]
Returns true if a keyboard is attached
pub fn is_key_down(&self, key: KeyboardButton) -> bool
[src]
Checks if a key is currently held down.
pub fn is_key_press(&self, key: KeyboardButton) -> bool
[src]
Checks if a key has been pressed down during the last frame.
pub fn is_key_release(&self, key: KeyboardButton) -> bool
[src]
Checks if a key has been released during the last frame.
pub fn is_key_repeat(&self, key: KeyboardButton) -> bool
[src]
Checks if a key has been repeated during the last frame.
pub fn text(&self) -> String
[src]
Gets captured text during the last frame.
impl InputSystemShared
[src]
pub fn has_mouse_attached(&self) -> bool
[src]
Returns true if a mouse is attached
pub fn is_mouse_down(&self, button: MouseButton) -> bool
[src]
Checks if a mouse button is held down.
pub fn is_mouse_press(&self, button: MouseButton) -> bool
[src]
Checks if a mouse button has been pressed during last frame.
pub fn is_mouse_release(&self, button: MouseButton) -> bool
[src]
Checks if a mouse button has been released during last frame.
pub fn is_mouse_click(&self, button: MouseButton) -> bool
[src]
Checks if a mouse button has been clicked during last frame.
pub fn is_mouse_double_click(&self, button: MouseButton) -> bool
[src]
Checks if a mouse button has been double clicked during last frame.
pub fn mouse_position(&self) -> Vector2<f32>
[src]
Gets the mouse position relative to the top-left hand corner of the window.
pub fn mouse_movement(&self) -> Vector2<f32>
[src]
Gets mouse movement in pixels since last frame.
pub fn mouse_scroll(&self) -> Vector2<f32>
[src]
Gets the scroll movement of mouse in pixels, usually provided by mouse wheel.
impl InputSystemShared
[src]
pub fn has_touchpad_attached(&self) -> bool
[src]
Returns true if a touchpad is attached
pub fn is_finger_touched(&self, n: usize) -> bool
[src]
Checks if the n
th finger is touched during last frame.
pub fn finger_position(&self, n: usize) -> Option<Vector2<f32>>
[src]
Gets the position of the n
th touched finger.
pub fn finger_tap(&self) -> GestureTap
[src]
Gets the tap gesture.
pub fn finger_double_tap(&self) -> GestureTap
[src]
Gets the double tap gesture.
pub fn finger_pan(&self) -> GesturePan
[src]
Gets the panning gesture.