[][src]Struct romy_core::input::Nes

pub struct Nes { /* fields omitted */ }

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]

impl InputCombine for Nes[src]

impl InputConvert for Nes[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]

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.