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: mbed
menu/Menu.h
- Committer:
- el18jgb
- Date:
- 2020-05-23
- Revision:
- 21:a0f3651f56c4
- Parent:
- 19:33c77517cb88
File content as of revision 21:a0f3651f56c4:
#ifndef MENU_H #define MENU_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Highscore.h" /** Menu class * @brief small main menu with instructions and highscore screen * @author Joe Body, University of Leeds * @date May 2020 */ class Menu { public: /** Constructor */ Menu(); /** Destructor */ ~Menu(); /** Initalises Menu*/ void init(); /** displays the main menu * @param lcd @details N5110 object * @param pad @details Gamepad object */ void display(N5110 &lcd, Gamepad &pad); /** Draws the spike * @param lcd @details N5110 object */ void draw(N5110 &lcd); /** updates the option * @param pad @details Gamepad object */ void update(Gamepad &pad); /** displays the instruction screen * @param lcd @details N5110 object * @param pad @details Gamepad object */ void instructions(N5110 &lcd, Gamepad &pad); /** displays the highscore screen * @param lcd @details N5110 object * @param pad @details Gamepad object * @param hs @details highscore class * @param sd @details SD File System */ void highs_screen(N5110 &lcd, Gamepad &pad, Highscore &hs, SDFileSystem &sd); /** gets the option */ int getmode(); private: /** option corresponding to play, highscore or instruction*/ int option; /** x position of sprite * @return _x */ int _x; /** y position of sprite * @return _y */ int _y; }; #endif