[−][src]Struct romy_core::input::Controller
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]
fn clone(&self) -> Controller
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for Controller
[src]
fn default() -> Controller
[src]
impl<'de> Deserialize<'de> for Controller
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl InputCombine for Controller
[src]
impl InputConvert for Controller
[src]
fn convert(&self, device_type: InputDeviceType) -> Option<InputDevice>
[src]
fn affinity(&self, device_type: InputDeviceType) -> Option<i32>
[src]
impl Serialize for Controller
[src]
Auto Trait Implementations
impl RefUnwindSafe for Controller
impl Send for Controller
impl Sync for Controller
impl Unpin for Controller
impl UnwindSafe for Controller
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,