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:
- 32:5403bb974294
- Parent:
- 31:becb8f6bf7b7
--- a/menu/menu.h Tue Apr 23 18:18:57 2019 +0000
+++ b/menu/menu.h Fri Apr 26 13:09:03 2019 +0000
@@ -1,14 +1,15 @@
#ifndef MENU_H
#define MENU_H
-//#include "stars.h"
-/** Available options in the menu. */
+/**
+ * The enumeration of available options in the menu.
+ */
enum ScreenOption {
- ScreenOption_Menu,
- ScreenOption_Game,
- ScreenOption_Tutorial,
- ScreenOption_Settings
+ ScreenOption_Menu, /**< The menu option - Choosing other options */
+ ScreenOption_Game, /**< The game option - To start the game */
+ ScreenOption_Tutorial, /**< The tutorial option - To open tutorial */
+ ScreenOption_Settings /**< The settings option - To open settings */
};
/**
@@ -21,7 +22,6 @@
public:
/** A constructor */
Menu();
-
/**
* @brief Updates and Draws menu.
* @details Updates and draws menu options. Also, allows to select an option availabe
@@ -33,9 +33,13 @@
ScreenOption getCurrentScreenSelection();
private:
+ int current_option;
+ static const int total_options = 3;
+ static const float time_delay = 50;
void pointerPosition(int menu_number);
void drawPointer();
- int current_option;
+ void DrawPressAIcon();
+ void checkJoystick();
};
