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
Fork of el17ajf by
OptionsMenu.cpp@20:cd96f98f5f79, 2019-04-03 (annotated)
- Committer:
- el17ajf
- Date:
- Wed Apr 03 17:25:15 2019 +0000
- Revision:
- 20:cd96f98f5f79
Menus system rewrite
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| el17ajf | 20:cd96f98f5f79 | 1 | #include "Menu.h" |
| el17ajf | 20:cd96f98f5f79 | 2 | |
| el17ajf | 20:cd96f98f5f79 | 3 | class OptionsMenu : Menu { |
| el17ajf | 20:cd96f98f5f79 | 4 | void updateAndDraw(UI ui) { |
| el17ajf | 20:cd96f98f5f79 | 5 | ui.drawLabel("options"); |
| el17ajf | 20:cd96f98f5f79 | 6 | ui.newLine(); |
| el17ajf | 20:cd96f98f5f79 | 7 | if (ui.drawAndCheckButton("clear all")) { |
| el17ajf | 20:cd96f98f5f79 | 8 | Prefs prefs; |
| el17ajf | 20:cd96f98f5f79 | 9 | prefs.resetAll(); |
| el17ajf | 20:cd96f98f5f79 | 10 | close(); |
| el17ajf | 20:cd96f98f5f79 | 11 | } |
| el17ajf | 20:cd96f98f5f79 | 12 | ui.newLine(); |
| el17ajf | 20:cd96f98f5f79 | 13 | if (ui.drawAndCheckButton("back")) { |
| el17ajf | 20:cd96f98f5f79 | 14 | close(); |
| el17ajf | 20:cd96f98f5f79 | 15 | } |
| el17ajf | 20:cd96f98f5f79 | 16 | } |
| el17ajf | 20:cd96f98f5f79 | 17 | }; |
