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.
Dependencies: mbed
Menu.h
00001 #ifndef MENU_H 00002 #define MENU_H 00003 00004 #include "mbed.h" 00005 #include "N5110.h" 00006 #include "Gamepad.h" 00007 00008 /** Menu Class 00009 @brief Class for settings and start game 00010 @author Zhou Jiaxin 00011 @date 8th May 2019 00012 */ 00013 00014 class Menu 00015 { 00016 public: 00017 /** Constructor */ 00018 Menu(); 00019 /** Destructor */ 00020 ~Menu(); 00021 00022 /** 00023 * @brief initial all the parameter for the snake and food. 00024 * @param select @details is used to switch the menu. 00025 * @param Gamepad *pad @details pointer to the gamepad object in main, address of this pointer is saved to make availability to the entire class, without passing address to each function. 00026 */ 00027 int input(int select,Gamepad &pad); 00028 /** 00029 * @brief Main menu for settings and start game. 00030 * @param N5110 *lcd @details pointer to the N5110 object in main, address of this pointer is saved to make availability to the entire class, without passing address to each function. 00031 * @param Gamepad *pad @details pointer to the gamepad object in main, address of this pointer is saved to make availability to the entire class, without passing address to each function. 00032 */ 00033 void menus(N5110 &lcd,Gamepad &pad); 00034 /** 00035 * @brief select difiiculty. 00036 * @param N5110 *lcd @details pointer to the N5110 object in main, address of this pointer is saved to make availability to the entire class, without passing address to each function. 00037 * @param Gamepad *pad @details pointer to the gamepad object in main, address of this pointer is saved to make availability to the entire class, without passing address to each function. 00038 * @returns fps @details is the frame per second, with higher fps means higher difficulty. 00039 */ 00040 int difficulty(N5110 &lcd,Gamepad &pad); 00041 00042 00043 private: 00044 int sel; 00045 int go_on; 00046 int _fps; 00047 00048 00049 }; 00050 00051 #endif
Generated on Tue Jul 12 2022 22:27:32 by
1.7.2