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@4:2deeeeb6c1e1, 2019-04-10 (annotated)
- Committer:
- batJoro
- Date:
- Wed Apr 10 21:35:21 2019 +0000
- Revision:
- 4:2deeeeb6c1e1
- Child:
- 6:4c55dd4b6d42
finish the number flush of the menu folder and check the code. Also try to split it in more functions/methods (10.04.2019)
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| batJoro | 4:2deeeeb6c1e1 | 1 | //#ifndef MENU_H |
| batJoro | 4:2deeeeb6c1e1 | 2 | //#define MENU_H |
| batJoro | 4:2deeeeb6c1e1 | 3 | #include <string> |
| batJoro | 4:2deeeeb6c1e1 | 4 | |
| batJoro | 4:2deeeeb6c1e1 | 5 | // star struct needed for the falling number screen flush |
| batJoro | 4:2deeeeb6c1e1 | 6 | struct symbol |
| batJoro | 4:2deeeeb6c1e1 | 7 | { |
| batJoro | 4:2deeeeb6c1e1 | 8 | //coords of a symbol and its distance |
| batJoro | 4:2deeeeb6c1e1 | 9 | int x,y,distance; |
| batJoro | 4:2deeeeb6c1e1 | 10 | }; |
| batJoro | 4:2deeeeb6c1e1 | 11 | |
| batJoro | 4:2deeeeb6c1e1 | 12 | class Menu { |
| batJoro | 4:2deeeeb6c1e1 | 13 | |
| batJoro | 4:2deeeeb6c1e1 | 14 | // public part of the class definition |
| batJoro | 4:2deeeeb6c1e1 | 15 | public: |
| batJoro | 4:2deeeeb6c1e1 | 16 | // intro for the welcome function |
| batJoro | 4:2deeeeb6c1e1 | 17 | void intro(N5110 &lcd); |
| batJoro | 4:2deeeeb6c1e1 | 18 | |
| batJoro | 4:2deeeeb6c1e1 | 19 | // run a short story mode |
| batJoro | 4:2deeeeb6c1e1 | 20 | void story(N5110 &lcd); |
| batJoro | 4:2deeeeb6c1e1 | 21 | |
| batJoro | 4:2deeeeb6c1e1 | 22 | // start the main menu and display options |
| batJoro | 4:2deeeeb6c1e1 | 23 | void startMainMenu(N5110 &lcd); |
| batJoro | 4:2deeeeb6c1e1 | 24 | |
| batJoro | 4:2deeeeb6c1e1 | 25 | // draw the different sectors of the menu |
| batJoro | 4:2deeeeb6c1e1 | 26 | void drawSelections(); |
| batJoro | 4:2deeeeb6c1e1 | 27 | |
| batJoro | 4:2deeeeb6c1e1 | 28 | // method to draw some of the strings, made on paint |
| batJoro | 4:2deeeeb6c1e1 | 29 | void drawLogo(N5110 &lcd, string name); |
| batJoro | 4:2deeeeb6c1e1 | 30 | |
| batJoro | 4:2deeeeb6c1e1 | 31 | // falling numbers screen flush |
| batJoro | 4:2deeeeb6c1e1 | 32 | void numberFall(N5110 &lcd); |
| batJoro | 4:2deeeeb6c1e1 | 33 | |
| batJoro | 4:2deeeeb6c1e1 | 34 | // private part of the class definition |
| batJoro | 4:2deeeeb6c1e1 | 35 | private: |
| batJoro | 4:2deeeeb6c1e1 | 36 | |
| batJoro | 4:2deeeeb6c1e1 | 37 | int number_of_sprites; |
| batJoro | 4:2deeeeb6c1e1 | 38 | static int logo0[]; |
| batJoro | 4:2deeeeb6c1e1 | 39 | static int logo1[]; |
| batJoro | 4:2deeeeb6c1e1 | 40 | |
| batJoro | 4:2deeeeb6c1e1 | 41 | }; |
| batJoro | 4:2deeeeb6c1e1 | 42 | |
| batJoro | 4:2deeeeb6c1e1 | 43 | //#endif |