[−][src]Struct ggez_goodies::input::InputBinding
A struct that contains a mapping from physical input events
(currently just KeyCode
s) to whatever your logical Axis/Button
types are.
Methods
impl<Axes, Buttons> InputBinding<Axes, Buttons> where
Axes: Hash + Eq + Clone,
Buttons: Hash + Eq + Clone,
[src]
Axes: Hash + Eq + Clone,
Buttons: Hash + Eq + Clone,
pub fn new() -> Self
[src]
pub fn bind_key_to_axis(
self,
keycode: KeyCode,
axis: Axes,
positive: bool
) -> Self
[src]
self,
keycode: KeyCode,
axis: Axes,
positive: bool
) -> Self
Adds a key binding connecting the given keycode to the given logical axis.
pub fn bind_key_to_button(self, keycode: KeyCode, button: Buttons) -> Self
[src]
Adds a key binding connecting the given keycode to the given logical button.
pub fn resolve(&self, keycode: KeyCode) -> Option<InputEffect<Axes, Buttons>>
[src]
Takes an physical input type and turns it into a logical input type (keycode -> axis/button).
Trait Implementations
impl<Axes: Clone, Buttons: Clone> Clone for InputBinding<Axes, Buttons> where
Axes: Hash + Eq + Clone,
Buttons: Hash + Eq + Clone,
[src]
Axes: Hash + Eq + Clone,
Buttons: Hash + Eq + Clone,
fn clone(&self) -> InputBinding<Axes, Buttons>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<Axes: PartialEq, Buttons: PartialEq> PartialEq<InputBinding<Axes, Buttons>> for InputBinding<Axes, Buttons> where
Axes: Hash + Eq + Clone,
Buttons: Hash + Eq + Clone,
[src]
Axes: Hash + Eq + Clone,
Buttons: Hash + Eq + Clone,
fn eq(&self, other: &InputBinding<Axes, Buttons>) -> bool
[src]
fn ne(&self, other: &InputBinding<Axes, Buttons>) -> bool
[src]
Auto Trait Implementations
impl<Axes, Buttons> Sync for InputBinding<Axes, Buttons> where
Axes: Sync,
Buttons: Sync,
Axes: Sync,
Buttons: Sync,
impl<Axes, Buttons> Send for InputBinding<Axes, Buttons> where
Axes: Send,
Buttons: Send,
Axes: Send,
Buttons: Send,
impl<Axes, Buttons> Unpin for InputBinding<Axes, Buttons> where
Axes: Unpin,
Buttons: Unpin,
Axes: Unpin,
Buttons: Unpin,
impl<Axes, Buttons> RefUnwindSafe for InputBinding<Axes, Buttons> where
Axes: RefUnwindSafe,
Buttons: RefUnwindSafe,
Axes: RefUnwindSafe,
Buttons: RefUnwindSafe,
impl<Axes, Buttons> UnwindSafe for InputBinding<Axes, Buttons> where
Axes: UnwindSafe,
Buttons: UnwindSafe,
Axes: UnwindSafe,
Buttons: UnwindSafe,
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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.