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/menu.h@11:0e6a221ad8a9, 2019-05-10 (annotated)
- Committer:
- batJoro
- Date:
- Fri May 10 13:58:51 2019 +0000
- Revision:
- 11:0e6a221ad8a9
- Parent:
- 8:b3738229ba85
- Child:
- 12:bc9a43f56261
final 2;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| batJoro | 6:4c55dd4b6d42 | 1 | #ifndef MENU_H |
| batJoro | 6:4c55dd4b6d42 | 2 | #define MENU_H |
| batJoro | 6:4c55dd4b6d42 | 3 | |
| batJoro | 4:2deeeeb6c1e1 | 4 | #include <string> |
| batJoro | 6:4c55dd4b6d42 | 5 | #include "Gamepad.h" |
| batJoro | 11:0e6a221ad8a9 | 6 | ; |
| batJoro | 4:2deeeeb6c1e1 | 7 | |
| batJoro | 11:0e6a221ad8a9 | 8 | /** Map Class |
| batJoro | 11:0e6a221ad8a9 | 9 | @author Dobri Tsvetkov, University of Leeds |
| batJoro | 11:0e6a221ad8a9 | 10 | @brief C++ class define a map for the track |
| batJoro | 11:0e6a221ad8a9 | 11 | @date May 2019 |
| batJoro | 11:0e6a221ad8a9 | 12 | */ |
| batJoro | 4:2deeeeb6c1e1 | 13 | class Menu { |
| batJoro | 4:2deeeeb6c1e1 | 14 | |
| batJoro | 4:2deeeeb6c1e1 | 15 | public: |
| batJoro | 11:0e6a221ad8a9 | 16 | /** |
| batJoro | 11:0e6a221ad8a9 | 17 | @brief Into to display the logo |
| batJoro | 11:0e6a221ad8a9 | 18 | @param N5110 &lcd, Gamepad &pad |
| batJoro | 11:0e6a221ad8a9 | 19 | @details reads the static int array and calls the next part |
| batJoro | 11:0e6a221ad8a9 | 20 | */ |
| batJoro | 6:4c55dd4b6d42 | 21 | void intro(N5110 &lcd, Gamepad &pad); |
| batJoro | 4:2deeeeb6c1e1 | 22 | |
| batJoro | 11:0e6a221ad8a9 | 23 | /** |
| batJoro | 11:0e6a221ad8a9 | 24 | @brief Call the subsequent acts |
| batJoro | 11:0e6a221ad8a9 | 25 | @param N5110 &lcd, Gamepad &pad |
| batJoro | 11:0e6a221ad8a9 | 26 | @details |
| batJoro | 11:0e6a221ad8a9 | 27 | */ |
| batJoro | 7:9e9424f5ec4b | 28 | void story(N5110 &lcd, Gamepad &pad); |
| batJoro | 11:0e6a221ad8a9 | 29 | /** |
| batJoro | 11:0e6a221ad8a9 | 30 | @brief display first part of the conversation |
| batJoro | 11:0e6a221ad8a9 | 31 | @param N5110 &lcd, Gamepad &pad |
| batJoro | 11:0e6a221ad8a9 | 32 | @details |
| batJoro | 11:0e6a221ad8a9 | 33 | */ |
| batJoro | 7:9e9424f5ec4b | 34 | void actI(N5110 &lcd, Gamepad &pad); |
| batJoro | 11:0e6a221ad8a9 | 35 | /** |
| batJoro | 11:0e6a221ad8a9 | 36 | @brief Display the second part of the conversation |
| batJoro | 11:0e6a221ad8a9 | 37 | @param N5110 &lcd, Gamepad &pad |
| batJoro | 11:0e6a221ad8a9 | 38 | @details |
| batJoro | 11:0e6a221ad8a9 | 39 | */ |
| batJoro | 7:9e9424f5ec4b | 40 | void actII(N5110 &lcd, Gamepad &pad); |
| batJoro | 4:2deeeeb6c1e1 | 41 | |
| batJoro | 11:0e6a221ad8a9 | 42 | /** |
| batJoro | 11:0e6a221ad8a9 | 43 | @brief Call the option method |
| batJoro | 11:0e6a221ad8a9 | 44 | @param N5110 &lcd, Gamepad &pad |
| batJoro | 11:0e6a221ad8a9 | 45 | @details |
| batJoro | 11:0e6a221ad8a9 | 46 | */ |
| batJoro | 8:b3738229ba85 | 47 | int startMainMenu(N5110 &lcd, Gamepad &pad); |
| batJoro | 4:2deeeeb6c1e1 | 48 | |
| batJoro | 11:0e6a221ad8a9 | 49 | /** |
| batJoro | 11:0e6a221ad8a9 | 50 | @brief Decide which choice has been chosen |
| batJoro | 11:0e6a221ad8a9 | 51 | @param N5110 &lcd, Gamepad &pad |
| batJoro | 11:0e6a221ad8a9 | 52 | @details |
| batJoro | 11:0e6a221ad8a9 | 53 | */ |
| batJoro | 7:9e9424f5ec4b | 54 | void drawSelections(N5110 &lcd, Gamepad &pad); |
| batJoro | 4:2deeeeb6c1e1 | 55 | |
| batJoro | 11:0e6a221ad8a9 | 56 | /** |
| batJoro | 11:0e6a221ad8a9 | 57 | @brief Draw the controls option |
| batJoro | 11:0e6a221ad8a9 | 58 | @param N5110 &lcd, Gamepad &pad |
| batJoro | 11:0e6a221ad8a9 | 59 | @details |
| batJoro | 11:0e6a221ad8a9 | 60 | */ |
| batJoro | 8:b3738229ba85 | 61 | void displayControls(N5110 &lcd, Gamepad &pad); |
| batJoro | 4:2deeeeb6c1e1 | 62 | |
| batJoro | 4:2deeeeb6c1e1 | 63 | // private part of the class definition |
| batJoro | 4:2deeeeb6c1e1 | 64 | private: |
| batJoro | 4:2deeeeb6c1e1 | 65 | |
| batJoro | 4:2deeeeb6c1e1 | 66 | int number_of_sprites; |
| batJoro | 4:2deeeeb6c1e1 | 67 | static int logo0[]; |
| batJoro | 8:b3738229ba85 | 68 | static int choice1[]; |
| batJoro | 8:b3738229ba85 | 69 | static int choice2[]; |
| batJoro | 8:b3738229ba85 | 70 | static int choice1_dark[]; |
| batJoro | 8:b3738229ba85 | 71 | static int choice2_dark[]; |
| batJoro | 8:b3738229ba85 | 72 | static int selector[]; |
| batJoro | 8:b3738229ba85 | 73 | static int clr_selector[]; |
| batJoro | 4:2deeeeb6c1e1 | 74 | |
| batJoro | 4:2deeeeb6c1e1 | 75 | }; |
| batJoro | 4:2deeeeb6c1e1 | 76 | |
| batJoro | 6:4c55dd4b6d42 | 77 | #endif |