Enum gilrs::ev::EventType [−][src]
pub enum EventType { ButtonPressed(Button, Code), ButtonRepeated(Button, Code), ButtonReleased(Button, Code), ButtonChanged(Button, f32, Code), AxisChanged(Axis, f32, Code), Connected, Disconnected, Dropped, }
Gamepad event.
Variants
ButtonPressed(Button, Code)
Some button on gamepad has been pressed.
ButtonRepeated(Button, Code)
This event can be generated by ev::Repeat
event filter.
ButtonReleased(Button, Code)
Previously pressed button has been released.
ButtonChanged(Button, f32, Code)
Value of button has changed. Value can be in range [0.0, 1.0].
AxisChanged(Axis, f32, Code)
Value of axis has changed. Value can be in range [-1.0, 1.0].
Connected
Gamepad has been connected. If gamepad's UUID doesn't match one of disconnected gamepads,
newly connected gamepad will get new ID. This event is also emitted when creating Gilrs
for every gamepad that was already connected.
Disconnected
Gamepad has been disconnected. Disconnected gamepad will not generate any new events.
Dropped
There was an Event
, but it was dropped by one of filters. You should ignore it.
Trait Implementations
impl Debug for EventType
[src]
impl Debug for EventType
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for EventType
[src]
impl Clone for EventType
fn clone(&self) -> EventType
[src]
fn clone(&self) -> EventType
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for EventType
[src]
impl Copy for EventType
impl PartialEq for EventType
[src]
impl PartialEq for EventType