Arturs Kozlovskis 201253737

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Menu.h Source File

Menu.h

00001 #ifndef MENU_H
00002 #define MENU_H
00003 #include "N5110.h"
00004 #include "Gamepad.h"
00005 #include "Objects.h"
00006 
00007 /**Menu class
00008 *@brief Makes menu and game screens 
00009 *@author Arturs Kozlovskis
00010 *@date April,2020
00011 */
00012 
00013 class Menu
00014 {
00015 public:
00016     //functions
00017     
00018     /**Constructor
00019     *@param N5110 object
00020     *@param Gamepad object
00021     */
00022     Menu(N5110 &lcd,Gamepad &pad);
00023     
00024     /**Make the inital screen
00025     */
00026     void first_screen();
00027     
00028     /**Make the menu screen*/
00029     void menu_screen();
00030     
00031     /**Get game speed
00032     *@return the current game speed(string)
00033     */
00034     string get_game_speed();
00035     
00036     /**Make the pause screen
00037     *@param the players score(int)
00038     *@return chosen option(int)
00039     */
00040     int pause_screen(int score);
00041     
00042     /**Make the game over screen
00043     *@param the players score(int)
00044     *@return the chosen option(int )
00045     */
00046     int game_over_screen(int score);
00047     
00048 private:
00049     //classes
00050     N5110 _lcd;
00051     Gamepad _pad;
00052     //variables
00053     int _arrow_pos;//holds the menu screen arrow position 
00054     int _arrow_pos_settings; //holds the setting screen arrow position
00055     string _game_speed; //holds the game speed
00056     char print_speed[6]; // holds the game speed in char
00057     char buf_score[4];//holds the score
00058 };
00059 
00060 #endif