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 FATFileSystem
Diff: Menu/Menu.h
- Revision:
- 4:035448357749
- Parent:
- 3:a8960004d261
- Child:
- 5:0b31909caf7f
--- a/Menu/Menu.h Fri Mar 29 18:45:40 2019 +0000
+++ b/Menu/Menu.h Mon Apr 08 15:10:28 2019 +0000
@@ -5,12 +5,6 @@
#include "N5110.h"
#include "Gamepad.h"
-/** Enum for menu options */
-enum MenuChoices {
- START, /**< Begin Game */
- HIGHSCORES, /**< View Highscores */
- SETTINGS, /**< View Settings */
-};
/** Menu Class
* @brief Library for navigating menu options
@@ -40,10 +34,12 @@
bool check_start(N5110 &lcd, Gamepad &pad);
/** Prints highscore screen */
- void print_highscores(N5110 &lcd);
+ void print_highscores(N5110 &lcd, Gamepad &pad);
/** Prints settings screen */
- void print_settings(N5110 &lcd);
+ void print_settings(N5110 &lcd, Gamepad &pad);
+
+ void draw_settings(N5110 &lcd, Gamepad &pad);
/** Changes screen to menu choice and returns start game message
* @returns a bool: true to start game, false to stay in menu
@@ -58,13 +54,39 @@
*/
void menu_select(Gamepad &pad, N5110 &lcd);
+ void set_frame_rate(int frame_rate);
+
+ void set_contrast(float contrast);
+
+ void set_brightness(float brightness);
+
+ int get_frame_rate();
+
+ float get_contrast();
+
+ float get_brightness();
+
private:
void draw_cursor(N5110 &lcd);
- MenuChoices _cursor_pos;
+ void move_cursor(N5110 &lcd);
+
+ int _cursor_pos;
+
+ float _pot;
+
+ float _contrast;
+
+ float _brightness;
+
+ int _frame_rate;
+
+ Direction _joy_direction;
+
+
};