pub struct MainMenu {
selected_index: usize,
menu_items: [MenuItem; 6],
debug: DebugOverlay,
}Fields§
§selected_index: usize§debug: DebugOverlayImplementations§
Source§impl MainMenu
impl MainMenu
pub fn new(_screen: &Screen) -> Self
pub fn select_next(&mut self)
pub fn select_prev(&mut self)
pub fn render(&mut self, screen: &mut Screen)
pub fn handle_input(&mut self, key: &InputKey) -> MenuAction
pub fn run( &mut self, screen: &mut Screen, keyboard: &mut Keyboard, ) -> MenuAction
Auto Trait Implementations§
impl Freeze for MainMenu
impl RefUnwindSafe for MainMenu
impl Send for MainMenu
impl Sync for MainMenu
impl Unpin for MainMenu
impl UnwindSafe for MainMenu
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