Ahmed Adamjee
/
SnakeVSBlock
Snake vs Block Game to be run upon K64F.
Diff: MenuClasses/StartScreen/StartScreen.h
- Revision:
- 66:e47333ffc6ca
- Parent:
- 65:2872ca289b49
- Child:
- 67:39b9ba6019b0
diff -r 2872ca289b49 -r e47333ffc6ca MenuClasses/StartScreen/StartScreen.h --- a/MenuClasses/StartScreen/StartScreen.h Fri May 03 19:16:02 2019 +0000 +++ b/MenuClasses/StartScreen/StartScreen.h Fri May 03 22:39:38 2019 +0000 @@ -26,7 +26,7 @@ * * This function draws the Sprite onto the screen. */ - void screen_saver(N5110 &lcd, Gamepad &pad); + void titleScreen(N5110 &lcd, Gamepad &pad); /** Instruct * @@ -46,23 +46,30 @@ */ void read_stats(SDFileSystem &sd); - /** The First Menu Screen + /** Check Back Pressed + * + * This function makes a centralised approach to check when back is pressed in a loop, so that it can be used to exit it and also go to. + * the previous menu option. + */ + bool checkBackPressed(Gamepad &pad); + + /** The Menu Screen * * This function obtains the user input on how they want to progress. */ - void main_menu(N5110 &lcd, Gamepad &pad); + void menuScreen(N5110 &lcd, Gamepad &pad); - /** Displaying The First Menu Screen + /** Main Menu * - * This function just displays Menu Screen 1 contents. + * This function displays all the Main Menu contents to the player. */ - void ImplementMenu(N5110 &lcd, Gamepad &pad); + void mainMenu(N5110 &lcd, Gamepad &pad); /** Implementing The First Menu Screen * * This function just implements the things decided in main menu. */ - void NextMenu(N5110 &lcd, Gamepad &pad); + void nextMenu(N5110 &lcd, Gamepad &pad); /** The Second Menu Screen * @@ -121,8 +128,8 @@ float controlSensitivity; //VARIABLES TO TOGGLE BACK AND FORTH BETWEEN MENU OPTIONS. - int back_pressed; //remembers if back is pressed. - int Start_Pressed; //remembers if start is pressed. + bool _backPressed; //remembers if back is pressed. + bool _startPressed; //remembers if start is pressed. private: