Struct rebind::RebindBuilder
[−]
[src]
pub struct RebindBuilder<A: Action> { // some fields omitted }
Convenience object for constructing an InputMap.
Methods
impl<A: Action> RebindBuilder<A>
[src]
fn new<S: Into<Size>>(size: S) -> Self
Creates a new RebindBuilder
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_action_mapping(self, button: Button, action: A) -> Self
Add an association between the Button and Action.
fn build_translator(self) -> InputTranslator<A>
Creates an InputTranslator
from this builder object.
fn build_rebind(self) -> InputRebind<A>
Creates an InputRebind
from this builder object.
Trait Implementations
impl<A: Action> Default for RebindBuilder<A>
[src]
Creates a new RebindBuilder
. The viewport size is set to (800, 600).
impl<A: Action> Into<InputTranslator<A>> for RebindBuilder<A>
[src]
fn into(self) -> InputTranslator<A>
Performs the conversion.
impl<A: Action> Into<InputRebind<A>> for RebindBuilder<A>
[src]
fn into(self) -> InputRebind<A>
Performs the conversion.