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@6:4c55dd4b6d42, 2019-05-03 (annotated)
- Committer:
- batJoro
- Date:
- Fri May 03 19:17:56 2019 +0000
- Revision:
- 6:4c55dd4b6d42
- Parent:
- 4:2deeeeb6c1e1
- Child:
- 7:9e9424f5ec4b
graphics1;
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 | 4:2deeeeb6c1e1 | 6 | |
| batJoro | 4:2deeeeb6c1e1 | 7 | // star struct needed for the falling number screen flush |
| batJoro | 4:2deeeeb6c1e1 | 8 | struct symbol |
| batJoro | 4:2deeeeb6c1e1 | 9 | { |
| batJoro | 4:2deeeeb6c1e1 | 10 | //coords of a symbol and its distance |
| batJoro | 4:2deeeeb6c1e1 | 11 | int x,y,distance; |
| batJoro | 4:2deeeeb6c1e1 | 12 | }; |
| batJoro | 4:2deeeeb6c1e1 | 13 | |
| batJoro | 4:2deeeeb6c1e1 | 14 | class Menu { |
| batJoro | 4:2deeeeb6c1e1 | 15 | |
| batJoro | 4:2deeeeb6c1e1 | 16 | // public part of the class definition |
| batJoro | 4:2deeeeb6c1e1 | 17 | public: |
| batJoro | 4:2deeeeb6c1e1 | 18 | // intro for the welcome function |
| batJoro | 6:4c55dd4b6d42 | 19 | void intro(N5110 &lcd, Gamepad &pad); |
| batJoro | 4:2deeeeb6c1e1 | 20 | |
| batJoro | 4:2deeeeb6c1e1 | 21 | // run a short story mode |
| batJoro | 4:2deeeeb6c1e1 | 22 | void story(N5110 &lcd); |
| batJoro | 4:2deeeeb6c1e1 | 23 | |
| batJoro | 4:2deeeeb6c1e1 | 24 | // start the main menu and display options |
| batJoro | 4:2deeeeb6c1e1 | 25 | void startMainMenu(N5110 &lcd); |
| batJoro | 4:2deeeeb6c1e1 | 26 | |
| batJoro | 4:2deeeeb6c1e1 | 27 | // draw the different sectors of the menu |
| batJoro | 4:2deeeeb6c1e1 | 28 | void drawSelections(); |
| batJoro | 4:2deeeeb6c1e1 | 29 | |
| batJoro | 4:2deeeeb6c1e1 | 30 | // method to draw some of the strings, made on paint |
| batJoro | 4:2deeeeb6c1e1 | 31 | void drawLogo(N5110 &lcd, string name); |
| batJoro | 4:2deeeeb6c1e1 | 32 | |
| batJoro | 4:2deeeeb6c1e1 | 33 | // falling numbers screen flush |
| batJoro | 4:2deeeeb6c1e1 | 34 | void numberFall(N5110 &lcd); |
| batJoro | 4:2deeeeb6c1e1 | 35 | |
| batJoro | 4:2deeeeb6c1e1 | 36 | // private part of the class definition |
| batJoro | 4:2deeeeb6c1e1 | 37 | private: |
| batJoro | 4:2deeeeb6c1e1 | 38 | |
| batJoro | 4:2deeeeb6c1e1 | 39 | int number_of_sprites; |
| batJoro | 4:2deeeeb6c1e1 | 40 | static int logo0[]; |
| batJoro | 4:2deeeeb6c1e1 | 41 | |
| batJoro | 4:2deeeeb6c1e1 | 42 | }; |
| batJoro | 4:2deeeeb6c1e1 | 43 | |
| batJoro | 6:4c55dd4b6d42 | 44 | #endif |