[−][src]Struct romy_core::input::Nes
An input type similar to a Nintendo Entertainment System controller, has a dpad and 2 primary buttons. Also has start + select.
Methods
impl Nes
[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 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 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_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
Trait Implementations
impl Clone for Nes
[src]
impl Default for Nes
[src]
impl<'de> Deserialize<'de> for Nes
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl InputCombine for Nes
[src]
impl InputConvert for Nes
[src]
fn convert(&self, device_type: InputDeviceType) -> Option<InputDevice>
[src]
fn affinity(&self, device_type: InputDeviceType) -> Option<i32>
[src]
impl Serialize for Nes
[src]
Auto Trait Implementations
impl RefUnwindSafe for Nes
impl Send for Nes
impl Sync for Nes
impl Unpin for Nes
impl UnwindSafe for Nes
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>,