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.
Menu/Menu.h
- Committer:
- thestudent
- Date:
- 2020-05-15
- Revision:
- 22:f1811602a817
- Parent:
- 21:32429d8e90ff
- Child:
- 27:da17a102c8d0
File content as of revision 22:f1811602a817:
#ifndef MENU_H
#define MENU_H
#include "N5110.h"
#include "Gamepad.h"
#include "Objects.h"
/**Menu class
*@brief Makes menu and game screens
*@author Arturs Kozlovskis
*@date April,2020
*/
class Menu
{
public:
//functions
/**Constructor
*@param LCD' object
*@param Gamepad's object
*/
Menu(N5110 &lcd,Gamepad &pad);
/**Make the inital screen
*/
void first_screen();
/**Make the menu screen*/
void menu_screen();
/**Get game speed
*@return the current game speed
*/
string get_game_speed();
/**Make the pause screen
*@param the players score
*@return chosen option
*/
int pause_screen(int score);
/**Make the game over screen
*@param the players score
*@return the chosen option
*/
int game_over_screen(int score);
private:
//classes
N5110 _lcd;
Gamepad _pad;
//variables
int _arrow_pos;//holds the menu screen arrow position
int _arrow_pos_settings; //holds the setting screen arrow position
string _game_speed; //holds the game speed
char print_speed[6]; // holds the game speed in char
char buf_score[4];//holds the score
};
#endif