Struct ggez_goodies::input::InputBinding
[−]
[src]
pub struct InputBinding<Axes, Buttons> where
Axes: Hash + Eq + Clone,
Buttons: Hash + Eq + Clone, { /* fields omitted */ }
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.
[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
Auto Trait Implementations
impl<Axes, Buttons> Send for InputBinding<Axes, Buttons> where
Axes: Send,
Buttons: Send,
Axes: Send,
Buttons: Send,
impl<Axes, Buttons> Sync for InputBinding<Axes, Buttons> where
Axes: Sync,
Buttons: Sync,
Axes: Sync,
Buttons: Sync,