pub enum EventType {
ButtonPressed(Button, Code),
ButtonRepeated(Button, Code),
ButtonReleased(Button, Code),
ButtonChanged(Button, f32, Code),
AxisChanged(Axis, f32, Code),
Connected,
Disconnected,
Dropped,
}
Expand description
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.
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§
source§impl PartialEq for EventType
impl PartialEq for EventType
impl Copy for EventType
impl StructuralPartialEq for EventType
Auto Trait Implementations§
impl RefUnwindSafe for EventType
impl Send for EventType
impl Sync for EventType
impl Unpin for EventType
impl UnwindSafe for EventType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more