Arturs Kozlovskis / Mbed 2 deprecated ELEC2645_Project_el18ak

Dependencies:   mbed

Menu/Menu.h

Committer:
thestudent
Date:
2020-05-21
Revision:
27:da17a102c8d0
Parent:
22:f1811602a817

File content as of revision 27:da17a102c8d0:

#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 N5110 object
    *@param Gamepad 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)
    */
    string get_game_speed();
    
    /**Make the pause screen
    *@param the players score(int)
    *@return chosen option(int)
    */
    int pause_screen(int score);
    
    /**Make the game over screen
    *@param the players score(int)
    *@return the chosen option(int )
    */
    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