Struct volition::Input [] [src]

pub struct Input {
    pub mouse_pos: (i32, i32),
    pub mouse_delta: (f32, f32),
    pub mouse_wheel_delta: (f32, f32),
    pub keys_down: Vec<Key>,
    pub keys_pressed: Vec<Key>,
    pub keys_released: Vec<Key>,
    pub characters_down: Vec<char>,
    pub mouse_btns_down: Vec<MouseButton>,
    pub mouse_btns_pressed: Vec<MouseButton>,
    pub mouse_btns_released: Vec<MouseButton>,
    pub hide_mouse: bool,
    // some fields omitted
}

struct for abstracting the state for all the inputs

Fields

The position of the mouse

The difference in mouse position from the last frame

The difference in position of the mouse when from the previous frame

The keys that are currently pressed down

The keys that have been pressed on this frame

The keys that have been released on this frame

Characters received that are pressed down

The mouse buttons that are currently pressed down

The mouse buttons that have been pressed down on this frame

The mouse buttons that have been release on this frame

Whether to show or hide the mouse

Methods

impl Input
[src]

Creates a new Input instance

This method updates the state of the inputs