Struct amethyst_input::Bindings [−][src]
Used for saving and loading input settings.
Methods
impl<AX, AC> Bindings<AX, AC> where
AX: Hash + Eq,
AC: Hash + Eq,
[src]
impl<AX, AC> Bindings<AX, AC> where
AX: Hash + Eq,
AC: Hash + Eq,
impl<AX, AC> Bindings<AX, AC> where
AX: Hash + Eq + Clone,
AC: Hash + Eq + Clone,
[src]
impl<AX, AC> Bindings<AX, AC> where
AX: Hash + Eq + Clone,
AC: Hash + Eq + Clone,
pub fn insert_axis<A: Into<AX>>(&mut self, id: A, axis: Axis) -> Option<Axis>
[src]
pub fn insert_axis<A: Into<AX>>(&mut self, id: A, axis: Axis) -> Option<Axis>
Assign an axis to an ID value
This will insert a new axis if no entry for this id exists. If one does exist this will replace the axis at that id and return it.
pub fn remove_axis<A: Hash + Eq + ?Sized>(&mut self, id: &A) -> Option<Axis> where
AX: Borrow<A>,
[src]
pub fn remove_axis<A: Hash + Eq + ?Sized>(&mut self, id: &A) -> Option<Axis> where
AX: Borrow<A>,
Removes an axis, this will return the removed axis if successful.
pub fn axis<A: Hash + Eq + ?Sized>(&mut self, id: &A) -> Option<&Axis> where
AX: Borrow<A>,
[src]
pub fn axis<A: Hash + Eq + ?Sized>(&mut self, id: &A) -> Option<&Axis> where
AX: Borrow<A>,
Returns a reference to an axis.
pub fn axes(&self) -> Vec<AX>
[src]
pub fn axes(&self) -> Vec<AX>
Gets a list of all axes
pub fn insert_action_binding<A>(&mut self, id: A, binding: Button) where
A: Hash + Eq + Into<AC>,
AC: Borrow<A>,
[src]
pub fn insert_action_binding<A>(&mut self, id: A, binding: Button) where
A: Hash + Eq + Into<AC>,
AC: Borrow<A>,
Add a button to an action.
This will insert a new binding between this action and the button.
pub fn remove_action_binding<T: Hash + Eq + ?Sized>(
&mut self,
id: &T,
binding: Button
) where
AC: Borrow<T>,
[src]
pub fn remove_action_binding<T: Hash + Eq + ?Sized>(
&mut self,
id: &T,
binding: Button
) where
AC: Borrow<T>,
Removes an action binding that was assigned previously.
pub fn action_bindings<T: Hash + Eq + ?Sized>(
&self,
id: &T
) -> Option<&[Button]> where
AC: Borrow<T>,
[src]
pub fn action_bindings<T: Hash + Eq + ?Sized>(
&self,
id: &T
) -> Option<&[Button]> where
AC: Borrow<T>,
Returns an action's bindings.
pub fn actions(&self) -> Vec<AC>
[src]
pub fn actions(&self) -> Vec<AC>
Gets a list of all action bindings
Trait Implementations
impl<AX, AC> Default for Bindings<AX, AC> where
AX: Hash + Eq,
AC: Hash + Eq,
[src]
impl<AX, AC> Default for Bindings<AX, AC> where
AX: Hash + Eq,
AC: Hash + Eq,
impl<AX: Clone, AC: Clone> Clone for Bindings<AX, AC> where
AX: Hash + Eq,
AC: Hash + Eq,
[src]
impl<AX: Clone, AC: Clone> Clone for Bindings<AX, AC> where
AX: Hash + Eq,
AC: Hash + Eq,