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:
- 12:7f7fadb5c106
- Parent:
- 5:0b31909caf7f
- Child:
- 13:681192091568
diff -r 6d2027253aa9 -r 7f7fadb5c106 Menu/Menu.h
--- a/Menu/Menu.h Thu Apr 25 15:16:38 2019 +0000
+++ b/Menu/Menu.h Fri May 03 09:39:24 2019 +0000
@@ -20,9 +20,10 @@
/** Destructor */
~Menu();
-
+
+ /** Sets class variables initial values */
void init();
-
+
/** Prints opening message */
void print_welcome(N5110 &lcd);
@@ -37,39 +38,30 @@
/** Prints settings screen */
void settings_screen(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
*/
bool menu_change(N5110 &lcd, Gamepad &pad);
- /** Updates cursor and returns menu choice
- * @returns an enum: START, HIGHSCORES, SETTINGS
- */
+ /** Updates cursor and returns menu choice*/
void cursor_select(Gamepad &pad, N5110 &lcd);
-
- void set_frame_rate(int frame_rate);
-
- void set_contrast(float contrast);
-
- void set_brightness(float brightness);
-
+
+ /** Returns frame rate
+ * @returns frame rate chosen in settings
+ */
int get_frame_rate();
- float get_contrast();
-
- float get_brightness();
-
+private:
-private:
-
+ void drawSettings(N5110 &lcd, Gamepad &pad);
- void draw_cursor(N5110 &lcd);
+ void drawSettingsBars(N5110 &lcd);
void move_cursor(N5110 &lcd);
+ void drawCursor(N5110 &lcd);
+
int _cursor_pos;
float _pot;