pub enum EventType {
ButtonPressed(Button, Code),
ButtonRepeated(Button, Code),
ButtonReleased(Button, Code),
ButtonChanged(Button, f32, Code),
AxisChanged(Axis, f32, Code),
Connected,
Disconnected,
Dropped,
}
Some button on gamepad has been pressed.
This event can be generated by ev::Repeat
event filter.
Previously pressed button has been released.
Value of button has changed. Value can be in range [0.0, 1.0].
Value of axis has changed. Value can be in range [-1.0, 1.0].
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.
Gamepad has been disconnected. Disconnected gamepad will not generate any new events.
There was an Event
, but it was dropped by one of filters. You should ignore it.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static