pub struct MenuInput {
pub up: bool,
pub down: bool,
pub confirm: bool,
pub cancel: bool,
}Expand description
Abstract menu input, decoupled from any specific platform or key binding.
A platform input layer (keyboard, gamepad, touch) converts its events
into a MenuInput struct and passes it to MenuSystem::handle_input.
Fields§
§up: boolUp / D-Pad Up pressed this frame.
down: boolDown / D-Pad Down pressed this frame.
confirm: boolConfirm / A button pressed this frame.
cancel: boolCancel / B button pressed this frame.
Trait Implementations§
impl Copy for MenuInput
impl Eq for MenuInput
impl StructuralPartialEq for MenuInput
Auto Trait Implementations§
impl Freeze for MenuInput
impl RefUnwindSafe for MenuInput
impl Send for MenuInput
impl Sync for MenuInput
impl Unpin for MenuInput
impl UnsafeUnpin for MenuInput
impl UnwindSafe for MenuInput
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