![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Adam Baker 201166301
Dependencies: mbed Gamepad N5110
Menu/Menu.h
- Committer:
- adambakerwa
- Date:
- 2019-05-08
- Revision:
- 41:4b20f909bbcb
- Parent:
- 40:f53c70793975
- Child:
- 43:11c5d098ce9d
File content as of revision 41:4b20f909bbcb:
#ifndef MENU_H #define MENU_H #include "mbed.h" #include "Gamepad.h" #include "N5110.h" /** Menu Class * @brief Library for interfacing with ELEC2645 Gamepad PCB, University of Leeds * @author Adam P. Baker */ class Menu { public: /** *@brief Constructor */ Menu(); /** *@brief Deconstructor */ ~Menu(); /** *@brief intialises */ void init(); /** *@brief runs the title sequence *@param lcd @brief class which controlls lcd screen *@param pad @breif class for working with the gamepad */ void title_intro(N5110 &lcd, Gamepad &pad); /** *@brief holds title screen and flashes 'press start' *@param lcd @brief class which controlls lcd screen *@param pad @breif class for working with the gamepad *@returns _start (1 when pressed, else 0) */ int press_start(N5110 &lcd, Gamepad &pad); /** *@brief displays main menu screen and takes in input to select next state *@param lcd @brief class which controlls lcd screen *@param pad @breif class for working with the gamepad *@returns _input (1 when pressed, else 0) */ int select_input_main(Gamepad &pad, N5110 &lcd); /** *@brief displays continue menu screen and takes in input to select next state *@param lcd @brief class which controlls lcd screen *@param pad @breif class for working with the gamepad *@returns _input (1 when pressed, else 0) */ int select_input_continue(Gamepad &pad, N5110 &lcd); /** *@brief displays highscore screen *@param lcd @brief class which controlls lcd screen *@param highscore @breif highest level reached by user */ void print_highscore(N5110 &lcd, int highscore); /** *@brief displays continue menu screen and takes in input to select next state *@param lcd @brief class which controlls lcd screen *@param pad @breif class for working with the gamepad *@returns contrast level */ float print_settings(Gamepad &pad, N5110 &lcd); private: void print_main_menu(N5110 &lcd); //prints menu class visuals void print_continue_menu(N5110 &lcd); //prints continue class visuals void menu_decoration(N5110 &lcd); //prints menu border decoration void intro_b(N5110 &lcd, Gamepad &pad); //display b with note void intro_bl(N5110 &lcd, Gamepad &pad); //display bl with note void intro_blo(N5110 &lcd, Gamepad &pad); //display blo with note void intro_bloc(N5110 &lcd, Gamepad &pad); //display bloc with note void intro_block(N5110 &lcd, Gamepad &pad); //display block with note void intro_block_h(N5110 &lcd, Gamepad &pad); //display block h with note void intro_block_he(N5110 &lcd, Gamepad &pad); //display block he with note void intro_block_hea(N5110 &lcd, Gamepad &pad); //display block hea with note void intro_block_head(N5110 &lcd, Gamepad &pad); //display block head with note void B(int x, int y, N5110 &lcd); //prints B HEAD sprite void BL(int x, int y, N5110 &lcd); //prints BL sprite void BLO(int x, int y, N5110 &lcd); //prints BLO sprite void BLOC(int x, int y, N5110 &lcd); //prints BLOC sprite void BLOCK(int x, int y, N5110 &lcd); //prints BLOCK sprite void BLOCK_H(int x, int y, N5110 &lcd); //prints BLOCK H sprite void BLOCK_HE(int x, int y, N5110 &lcd); //prints BLOCK HE sprite void BLOCK_HEA(int x, int y, N5110 &lcd); //prints BLOCK HEA sprite void BLOCK_HEAD(int x, int y, N5110 &lcd); //prints BLOCK HEAD sprite int _start; int _count; int _select; int _input; int _stop; bool _flash; }; #endif