Struct piston::input::JoystickAxisArgs
[−]
pub struct JoystickAxisArgs { pub id: i32, pub axis: u8, pub position: f64, }
Components of a joystick axis move event. Not guaranteed consistent across backends.
Fields
id: i32
Which joystick moved.
axis: u8
The axis that moved.
position: f64
Position of the joystick. Usually [-1.0, 1.0], though backends may use a different range for various devices.
Methods
impl JoystickAxisArgs
fn new(id: i32, axis: u8, position: f64) -> JoystickAxisArgs
Create a new JoystickAxisArgs object. Intended for use by backends when emitting events.