Struct rebind::Builder
[−]
[src]
pub struct Builder<A: Action, S: BuildHasher = RandomState> { /* fields omitted */ }
Convenience object for constructing an InputMap.
Methods
impl<A: Action, S: BuildHasher + Default> Builder<A, S>
[src]
fn new<Sz: Into<Size>>(size: Sz) -> Self
Creates a new Builder
with the specified viewport size.
fn x_scroll_inverted(self, invert: bool) -> Self
Set whether the x scroll is inverted on the builder.
fn get_x_scroll_inverted(&self) -> bool
Returns true if the x scroll is inverted on the builder.
fn y_scroll_inverted(self, invert: bool) -> Self
Set whether the y scroll is inverted on the builder.
fn get_y_scroll_inverted(&self) -> bool
Returns true if the y scroll is inverted on the builder.
fn x_motion_inverted(self, invert: bool) -> Self
Set whether the x axis motion is inverted on the builder.
fn get_x_motion_inverted(&self) -> bool
Returns true if the x axis motion is inverted on the builder.
fn y_motion_inverted(self, invert: bool) -> Self
Set whether the y axis motion is inverted on the builder.
fn get_y_motion_inverted(&self) -> bool
Returns true if the y axis motion is inverted on the builder.
fn mouse_sensitivity(self, sensitivity: f64) -> Self
Set the mouse sensitivity.
fn get_mouse_sensitivity(&self) -> f64
Returns the mouse sensitivity.
fn viewport_size(self, size: Size) -> Self
Sets the viewport size used for mouse position calculations.
fn get_viewport_size(&self) -> Size
Returns the currently set viewport size.
fn with_mapping(self, action: A, button: Button) -> Self
Add an association between the Button and Action.
fn build_translator(self) -> InputTranslator<A, S>
Creates an InputTranslator
from this builder object.
fn build_rebind(self) -> InputRebind<A, S>
Creates an InputRebind
from this builder object.
Trait Implementations
impl<A: Debug + Action, S: Debug + BuildHasher> Debug for Builder<A, S>
[src]
impl<A: Action, S: BuildHasher + Default> Default for Builder<A, S>
[src]
impl<A: Action, S: BuildHasher + Default> Into<InputTranslator<A, S>> for Builder<A, S>
[src]
fn into(self) -> InputTranslator<A, S>
Performs the conversion.
impl<A: Action, S: BuildHasher + Default> Into<InputRebind<A, S>> for Builder<A, S>
[src]
fn into(self) -> InputRebind<A, S>
Performs the conversion.