Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: N5110 PinDetect PowerControl mbed
MainMenu.h
- Committer:
- Siriagus
- Date:
- 2015-05-11
- Revision:
- 17:d6a3b29cab31
- Parent:
- 12:8178fad5e660
- Child:
- 18:709ea375b0df
File content as of revision 17:d6a3b29cab31:
#ifndef MAIN_MENU_H #define MAIN_MENU_H /** @file MainMenu.h * @author Andreas Garmannslund * @date April 2015 */ #include "State.h" #include "Resources.h" #include "Global.h" #include <string> #include <sstream> /// State: Main Menu class MainMenu : public State { public: /// Creates a new MainMenu object MainMenu(StateManager* fsm, N5110 *lcd, InputManager* input, Sound *sound) : State(fsm, lcd, input, sound) {init();} virtual void update(float dt); /// Update logic virtual void render(); /// Draw MainMenu to screen private: void init(); static void btnAPress(); /// Interrupt callback function when button A is pressed static void btnBPress(); /// Interrupt callback function when button B is pressed static void btnCPress(); /// Interrupt callback function when button C is pressed // Variables private: /// States for the main menu's internal finite state machine enum MenuState {SELECT_PLAY, SELECT_HIGHSCORES, SELECT_CONTROLS, LOAD_GAME, HIGHSCORES, CONTROLS}; static int currentState; /// Current state of the internal finite state machine /** Transition table for internal fsm * Each row corresponds to a state * Each column corresponds to the button pressed */ static const int MENU_FSM[6][3]; }; #endif