ELEC2645 (2019/20) / Mbed 2 deprecated el18loc_final

Dependencies:   mbed

Revision:
8:f305ea78b2b1
Child:
13:27300c533dd1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Menu/Menu.h	Tue May 05 16:46:01 2020 +0000
@@ -0,0 +1,57 @@
+#ifndef MENU_H
+#define MENU_H
+
+#include "mbed.h"
+#include "N5110.h"
+#include "Gamepad.h"
+#include "Front.h"
+
+/** Menu class
+ * @author Luke Cartwright, University of Leeds
+ * @brief manages all menu selection and movement
+ * @date May 2020
+*/
+
+class Menu
+{
+public://-----------------------------------------------------------------------
+    //variables
+
+    //methods
+    //constructor
+    Menu();
+
+    //destructior
+    ~Menu();
+
+    //runs main menu code
+    void mainmenu(N5110 &lcd, Gamepad &pad);
+
+    //sub menus
+    void subwaveforms(N5110 &lcd, Gamepad &pad, int submenu);
+    void subinstructions(N5110 &lcd, Gamepad &pad);
+    void subcredits(N5110 &lcd, Gamepad &pad);
+    int scroll(N5110 &lcd, Gamepad &pad);
+
+private: //---------------------------------------------------------------------
+    //variables
+    int menuflag;
+    int g_selecty;
+    int submenu;
+    int menusize;
+    enum d;
+    int s;
+
+
+    //Methods
+    void printmainmenu(N5110 &lcd); //prints menu
+    void printsubwaveforms(N5110 &lcd); //prints subwaveforms menu
+    void subunavailiable(N5110 &lcd); //prints error for sub
+    int scroll_check(Gamepad &pad);
+
+
+
+
+};
+
+#endif
\ No newline at end of file