pub struct Buttons {
pub a: bool,
pub b: bool,
pub x: bool,
pub y: bool,
pub up: bool,
pub down: bool,
pub left: bool,
pub right: bool,
pub left_trigger_1: bool,
pub left_trigger_2: bool,
pub right_trigger_1: bool,
pub right_trigger_2: bool,
}Expand description
Holds whether or not the buttons on the controller are pressed or not
Fields§
§a: boolThe ‘A’ button on the right button pad of the controller.
b: boolThe ‘B’ button on the right button pad of the controller.
x: boolThe ‘X’ button on the right button pad of the controller.
y: boolThe ‘Y’ button on the right button pad of the controller.
up: boolThe up arrow on the left arrow pad of the controller.
down: boolThe down arrow on the left arrow pad of the controller.
left: boolThe left arrow on the left arrow pad of the controller.
right: boolThe right arrow on the left arrow pad of the controller.
left_trigger_1: boolThe first trigger on the left side of the controller.
left_trigger_2: boolThe second trigger on the left side of the controller.
right_trigger_1: boolThe first trigger on the right side of the controller.
right_trigger_2: boolThe second trigger on the right side of the controller.
Trait Implementations§
impl Copy for Buttons
impl Eq for Buttons
impl StructuralPartialEq for Buttons
Auto Trait Implementations§
impl Freeze for Buttons
impl RefUnwindSafe for Buttons
impl Send for Buttons
impl Sync for Buttons
impl Unpin for Buttons
impl UnwindSafe for Buttons
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