pub enum MenuAction {
None,
Selected(u8),
Cancelled,
Up,
Down,
Scroll(u8),
}Expand description
Outcome of MenuSystem::handle_input.
The caller (game loop) uses this to transition game state — e.g.
Selected(0) on the main menu means “New Game”.
Variants§
None
No input or no state change this frame.
Selected(u8)
The player confirmed on option N (0-based index).
Cancelled
The player pressed Cancel / B.
Up
Cursor moved up (may be used for sound effects).
Down
Cursor moved down (may be used for sound effects).
Scroll(u8)
Scroll position changed to N (for scrollable menus).
Trait Implementations§
Source§impl Clone for MenuAction
impl Clone for MenuAction
Source§fn clone(&self) -> MenuAction
fn clone(&self) -> MenuAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MenuAction
Source§impl Debug for MenuAction
impl Debug for MenuAction
impl Eq for MenuAction
Source§impl PartialEq for MenuAction
impl PartialEq for MenuAction
impl StructuralPartialEq for MenuAction
Auto Trait Implementations§
impl Freeze for MenuAction
impl RefUnwindSafe for MenuAction
impl Send for MenuAction
impl Sync for MenuAction
impl Unpin for MenuAction
impl UnsafeUnpin for MenuAction
impl UnwindSafe for MenuAction
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