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
Diff: menu/Menu.h
- Revision:
- 21:a0f3651f56c4
- Parent:
- 19:33c77517cb88
diff -r 6db651a3cfec -r a0f3651f56c4 menu/Menu.h
--- a/menu/Menu.h Fri May 22 14:06:35 2020 +0000
+++ b/menu/Menu.h Sat May 23 13:59:51 2020 +0000
@@ -7,32 +7,72 @@
#include "Highscore.h"
-/** menu Class
-@date april 2020
-*/
+/** 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;
- int _height;
- int _width;
+ /** x position of sprite
+ * @return _x
+ */
int _x;
+
+ /** y position of sprite
+ * @return _y
+ */
int _y;
};