Struct rebind::InputTranslator
[−]
[src]
pub struct InputTranslator<A: Action> { // some fields omitted }
An object which translates piston::input::Input events into input_map::Translated events
Methods
impl<A: Action> InputTranslator<A>
[src]
fn new<S: Into<Size>>(size: S) -> Self
Creates an empty InputTranslator.
fn translate(&self, input: &Input) -> Option<Translated<A>>
Translate an Input into a Translated event. Returns None
if there is no
action associated with the Input
variant.
fn set_size(&mut self, size: Size)
Re-set the mouse bounds size used for calculating mouse events
fn set_size_from_viewport(&mut self, vp: Viewport)
Re-set the mouse bounds size from a viewport
fn into_rebind(self) -> InputRebind<A>
Convert the InputTranslator
into an InputRebind
. Consumes the
InputTranslator
.
Trait Implementations
impl<A: PartialEq + Action> PartialEq for InputTranslator<A>
[src]
fn eq(&self, __arg_0: &InputTranslator<A>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &InputTranslator<A>) -> bool
This method tests for !=
.
impl<A: Debug + Action> Debug for InputTranslator<A>
[src]
impl<A: Clone + Action> Clone for InputTranslator<A>
[src]
fn clone(&self) -> InputTranslator<A>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<A: Action> Into<InputRebind<A>> for InputTranslator<A>
[src]
fn into(self) -> InputRebind<A>
Performs the conversion.