Struct tic80::GamePadButtons
source · pub struct GamePadButtons { /* private fields */ }
Implementations§
source§impl GamePadButtons
impl GamePadButtons
pub fn new( up: bool, down: bool, left: bool, right: bool, a: bool, b: bool, x: bool, y: bool ) -> Self
pub fn up(&self) -> bool
pub fn set_up(&mut self, value: bool)
pub fn down(&self) -> bool
pub fn set_down(&mut self, value: bool)
pub fn left(&self) -> bool
pub fn set_left(&mut self, value: bool)
pub fn right(&self) -> bool
pub fn set_right(&mut self, value: bool)
pub fn a(&self) -> bool
pub fn set_a(&mut self, value: bool)
pub fn b(&self) -> bool
pub fn set_b(&mut self, value: bool)
pub fn x(&self) -> bool
pub fn set_x(&mut self, value: bool)
pub fn y(&self) -> bool
pub fn set_y(&mut self, value: bool)
Trait Implementations§
source§impl BitAnd<Button> for GamePadButtons
impl BitAnd<Button> for GamePadButtons
source§impl BitOr<Button> for GamePadButtons
impl BitOr<Button> for GamePadButtons
source§impl Bitsized for GamePadButtons
impl Bitsized for GamePadButtons
source§impl Clone for GamePadButtons
impl Clone for GamePadButtons
source§fn clone(&self) -> GamePadButtons
fn clone(&self) -> GamePadButtons
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl From<GamePadButtons> for u8
impl From<GamePadButtons> for u8
source§fn from(value: GamePadButtons) -> Self
fn from(value: GamePadButtons) -> Self
Converts to this type from the input type.
source§impl From<u8> for GamePadButtons
impl From<u8> for GamePadButtons
source§impl PartialEq for GamePadButtons
impl PartialEq for GamePadButtons
source§fn eq(&self, other: &GamePadButtons) -> bool
fn eq(&self, other: &GamePadButtons) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for GamePadButtons
impl StructuralPartialEq for GamePadButtons
Auto Trait Implementations§
impl RefUnwindSafe for GamePadButtons
impl Send for GamePadButtons
impl Sync for GamePadButtons
impl Unpin for GamePadButtons
impl UnwindSafe for GamePadButtons
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more