[][src]Struct romy_core::input::Controller

pub struct Controller { /* fields omitted */ }

A standard controller, similar to one used for a XBox 360

Methods

impl Controller[src]

pub fn new(init: ControllerInit) -> Self[src]

pub fn a(&self) -> bool[src]

Is the a button down

pub fn b(&self) -> bool[src]

Is the b button down

pub fn x(&self) -> bool[src]

Is the x button down

pub fn y(&self) -> bool[src]

Is the y button down

pub fn up(&self) -> bool[src]

Is the up button down

pub fn down(&self) -> bool[src]

Is the down button down

pub fn left(&self) -> bool[src]

Is the left button down

pub fn right(&self) -> bool[src]

Is the right button down

pub fn start(&self) -> bool[src]

Is the start button down

pub fn select(&self) -> bool[src]

Is the select button down

pub fn guide(&self) -> bool[src]

Is the guide button down

pub fn left_shoulder(&self) -> bool[src]

Is the left shoulder button down

pub fn right_shoulder(&self) -> bool[src]

Is the right shoulder button down

pub fn left_stick(&self) -> bool[src]

Is the left stick button down

pub fn right_stick(&self) -> bool[src]

Is the right stick button down

pub fn left_stick_x(&self) -> f32[src]

Left stick position x [-1 - +1] -1 left +1 right

pub fn left_stick_y(&self) -> f32[src]

Left stick position y [-1 - +1] -1 up +1 down

pub fn right_stick_x(&self) -> f32[src]

Right stick position x [-1 - +1] -1 left +1 right

pub fn right_stick_y(&self) -> f32[src]

Right stick position y [-1 - +1] -1 up +1 down

pub fn left_trigger(&self) -> f32[src]

Left trigger position [0 - +1] +1 fully down

pub fn right_trigger(&self) -> f32[src]

Right trigger position [0 - +1] +1 fully down

pub fn set_a(&mut self, value: bool)[src]

Sets the state of the a button

pub fn set_b(&mut self, value: bool)[src]

Sets the state of the b button

pub fn set_x(&mut self, value: bool)[src]

Sets the state of the x button

pub fn set_y(&mut self, value: bool)[src]

Sets the state of the y button

pub fn set_up(&mut self, value: bool)[src]

Sets the state of the up button

pub fn set_down(&mut self, value: bool)[src]

Sets the state of the down button

pub fn set_left(&mut self, value: bool)[src]

Sets the state of the left button

pub fn set_right(&mut self, value: bool)[src]

Sets the state of the right button

pub fn set_start(&mut self, value: bool)[src]

Sets the state of the start button

pub fn set_select(&mut self, value: bool)[src]

Sets the state of the select button

pub fn set_guide(&mut self, value: bool)[src]

Sets the state of the guide button

pub fn set_left_shoulder(&mut self, value: bool)[src]

Sets the state of the left shoulder button

pub fn set_right_shoulder(&mut self, value: bool)[src]

Sets the state of the right shoulder button

pub fn set_left_stick(&mut self, value: bool)[src]

Sets the state of the left stick button

pub fn set_right_stick(&mut self, value: bool)[src]

Sets the state of the right stick button

pub fn set_left_stick_x(&mut self, value: f32)[src]

Sets the state of the left stick x axis

pub fn set_left_stick_y(&mut self, value: f32)[src]

Sets the state of the left stick y axis

pub fn set_right_stick_x(&mut self, value: f32)[src]

Sets the state of the right stick x axis

pub fn set_right_stick_y(&mut self, value: f32)[src]

Sets the state of the right stick y axis

pub fn set_left_trigger(&mut self, value: f32)[src]

Sets the state of the left trigger

pub fn set_right_trigger(&mut self, value: f32)[src]

Sets the state of the right trigger

Trait Implementations

impl Clone for Controller[src]

impl Default for Controller[src]

impl<'de> Deserialize<'de> for Controller[src]

impl InputCombine for Controller[src]

impl InputConvert for Controller[src]

impl Serialize for Controller[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.