[−][src]Enum amethyst_input::InputEvent
Events generated by the input system
Type parameter T is the type assigned to your Actions for your InputBundle or InputHandler.
Variants
KeyPressed
A key was pressed down, sent exactly once per key press.
Fields of KeyPressed
key_code: VirtualKeyCode
VirtualKeyCode
, used for semantic info. i.e. "W" was pressed
scancode: u32
Scancode, used for positional info. i.e. The third key on the first row was pressed.
KeyReleased
A key was released, sent exactly once per key release.
Fields of KeyReleased
key_code: VirtualKeyCode
VirtualKeyCode
, used for semantic info. i.e. "W" was released
scancode: u32
Scancode, used for positional info. i.e. The third key on the first row was released.
KeyTyped(char)
A unicode character was received by the window. Good for typing.
MouseButtonPressed(MouseButton)
A mouse button was pressed down, sent exactly once per press.
MouseButtonReleased(MouseButton)
A mouse button was released, sent exactly once per release.
ButtonPressed(Button)
A button was pressed.
ButtonReleased(Button)
A button was released.
CursorMoved
The mouse pointer moved on screen
Fields of CursorMoved
MouseMoved
The mouse device moved. Use this for any use of the mouse that doesn't involve a standard mouse pointer.
Fields of MouseMoved
MouseWheelMoved(ScrollDirection)
The mousewheel was moved in either direction
AxisMoved
An axis value changed.
Note that this variant is used for BindingTypes::Axis
, not a ControllerAxis
.
Fields of AxisMoved
ControllerAxisMoved
A controller Axis was moved.
Note that this variant is used for a ControllerAxis
, not BindingTypes::Axis
.
Fields of ControllerAxisMoved
which: u32
The id for the controller whose axis moved.
axis: ControllerAxis
The axis that moved on the controller.
value: f32
The amount that the axis moved.
ControllerButtonPressed
A controller button was pressed.
Fields of ControllerButtonPressed
ControllerButtonReleased
A controller button was released.
Fields of ControllerButtonReleased
ControllerConnected
New controller was connected.
Fields of ControllerConnected
which: u32
The id for the controller connected.
ControllerDisconnected
Controller was disconnected, its id might be reused later.
Fields of ControllerDisconnected
which: u32
The id for the controller disconnected.
ActionPressed(T::Action)
The associated action had any related button or combination pressed.
If a combination is bound to an action, it will be pressed if all buttons within are pressed.
ActionReleased(T::Action)
The associated action had any related button or combination released.
If a combination is bound to an action, it will be released if any of the buttons within is released while all others are pressed.
ActionWheelMoved(T::Action)
The associated action has its mouse wheel moved.
Trait Implementations
impl<T> Clone for InputEvent<T> where
T: BindingTypes,
[src]
T: BindingTypes,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: PartialEq> PartialEq<InputEvent<T>> for InputEvent<T> where
T: BindingTypes,
T::Axis: PartialEq,
T::Action: PartialEq,
T::Action: PartialEq,
T::Action: PartialEq,
[src]
T: BindingTypes,
T::Axis: PartialEq,
T::Action: PartialEq,
T::Action: PartialEq,
T::Action: PartialEq,
fn eq(&self, other: &InputEvent<T>) -> bool
[src]
fn ne(&self, other: &InputEvent<T>) -> bool
[src]
impl<'a, T> Into<InputEvent<T>> for &'a ControllerEvent where
T: BindingTypes,
[src]
T: BindingTypes,
fn into(self) -> InputEvent<T>
[src]
impl<T: Debug> Debug for InputEvent<T> where
T: BindingTypes,
T::Axis: Debug,
T::Action: Debug,
T::Action: Debug,
T::Action: Debug,
[src]
T: BindingTypes,
T::Axis: Debug,
T::Action: Debug,
T::Action: Debug,
T::Action: Debug,
impl<'de, T> Deserialize<'de> for InputEvent<T> where
T: BindingTypes,
T::Axis: Deserialize<'de>,
T::Action: Deserialize<'de>,
T::Action: Deserialize<'de>,
T::Action: Deserialize<'de>,
[src]
T: BindingTypes,
T::Axis: Deserialize<'de>,
T::Action: Deserialize<'de>,
T::Action: Deserialize<'de>,
T::Action: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<T> Serialize for InputEvent<T> where
T: BindingTypes,
T::Axis: Serialize,
T::Action: Serialize,
T::Action: Serialize,
T::Action: Serialize,
[src]
T: BindingTypes,
T::Axis: Serialize,
T::Action: Serialize,
T::Action: Serialize,
T::Action: Serialize,
Auto Trait Implementations
impl<T> Unpin for InputEvent<T> where
<T as BindingTypes>::Action: Unpin,
<T as BindingTypes>::Axis: Unpin,
<T as BindingTypes>::Action: Unpin,
<T as BindingTypes>::Axis: Unpin,
impl<T> Sync for InputEvent<T> where
<T as BindingTypes>::Action: Sync,
<T as BindingTypes>::Axis: Sync,
<T as BindingTypes>::Action: Sync,
<T as BindingTypes>::Axis: Sync,
impl<T> Send for InputEvent<T> where
<T as BindingTypes>::Action: Send,
<T as BindingTypes>::Axis: Send,
<T as BindingTypes>::Action: Send,
<T as BindingTypes>::Axis: Send,
impl<T> UnwindSafe for InputEvent<T> where
<T as BindingTypes>::Action: UnwindSafe,
<T as BindingTypes>::Axis: UnwindSafe,
<T as BindingTypes>::Action: UnwindSafe,
<T as BindingTypes>::Axis: UnwindSafe,
impl<T> RefUnwindSafe for InputEvent<T> where
<T as BindingTypes>::Action: RefUnwindSafe,
<T as BindingTypes>::Axis: RefUnwindSafe,
<T as BindingTypes>::Action: RefUnwindSafe,
<T as BindingTypes>::Axis: RefUnwindSafe,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> SetParameter for T
[src]
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
[src]
T: Parameter<Self>,
Sets value
as a parameter of self
.
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
unsafe fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
impl<T> Resource for T where
T: Any + Send + Sync,
[src]
T: Any + Send + Sync,
impl<T> Any for T where
T: Any,
[src]
T: Any,
fn get_type_id(&self) -> TypeId
[src]
impl<T> Event for T where
T: Send + Sync + 'static,
[src]
T: Send + Sync + 'static,