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
Fork of el17dg by
Diff: menu/menu.h
- Revision:
- 4:02c63aaa2df9
- Child:
- 27:f05f4e738ba9
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/menu/menu.h Sun Mar 03 23:36:34 2019 +0000
@@ -0,0 +1,27 @@
+#ifndef MENU_H
+#define MENU_H
+
+enum ScreenOption { //the available options in the menu.
+ ScreenOption_Menu,
+ ScreenOption_Game,
+ ScreenOption_Tutorial,
+ ScreenOption_Settings
+};
+
+class Menu {
+ public:
+ Menu();
+ // Updates menu input, option select and draws menu
+ // Return true if user picked a menu option
+ bool updateAndDraw();
+
+ ScreenOption getCurrentScreenSelection();
+
+ private:
+ void pointerPosition(int menu_number);
+ void drawPointer();
+ int current_option; // NOTE to self: can declare variables in classes.
+};
+
+
+#endif
\ No newline at end of file
