Struct amethyst_input::Bindings
[−]
[src]
pub struct Bindings { /* fields omitted */ }
Used for saving and loading input settings.
Methods
impl Bindings
[src]
fn insert_axis<T: Into<String>>(&mut self, id: T, 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.
fn remove_axis<T: AsRef<str>>(&mut self, id: T) -> Option<Axis>
Removes an axis, this will return the removed axis if successful.
fn axis<T: AsRef<str>>(&mut self, id: T) -> Option<&Axis>
Returns a reference to an axis.
fn axes(&self) -> Vec<String>
Gets a list of all axes
fn insert_action_binding<T: AsRef<str>>(&mut self, id: T, binding: Button)
Add a button to an action.
This will insert a new binding between this action and the button.
fn remove_action_binding<T: AsRef<str>>(&mut self, id: T, binding: Button)
Removes an action binding that was assigned previously.
fn action_bindings<T: AsRef<str>>(&self, id: T) -> Option<&[Button]>
Returns an action's bindings.
fn actions(&self) -> Vec<String>
Gets a list of all action bindings