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
Diff: Menus/UI/UI.cpp
- Revision:
- 30:11838cb6979f
- Parent:
- 27:2ed9e3c9f4e9
- Child:
- 32:7b5a864b9234
--- a/Menus/UI/UI.cpp Sat Apr 13 08:33:49 2019 +0000
+++ b/Menus/UI/UI.cpp Sat Apr 13 09:29:37 2019 +0000
@@ -1,8 +1,63 @@
#include "UI.h"
#include "Graphics.h"
#include "Math.h"
+#include "Bitmap.h"
namespace Menus {
+
+ const int logo_sprite_data[] = {
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,0,0,0,0,1,1,0,0,1,
+ 1,0,0,0,0,1,1,0,0,1,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,0,0,1,1,0,0,1,1,1,
+ 1,0,0,1,1,0,0,1,1,1,
+ 1,0,0,0,0,0,0,0,0,1,
+ 1,0,0,0,0,0,0,0,0,1,
+ 1,1,1,0,0,1,1,0,0,1,
+ 1,1,1,0,0,1,1,0,0,1,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,0,0,0,0,0,0,0,0,1,
+ 1,0,0,0,0,0,0,0,0,1,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,0,0,0,0,1,1,0,0,1,
+ 1,0,0,0,0,1,1,0,0,1,
+ 1,0,0,1,1,0,0,1,1,1,
+ 1,0,0,1,1,0,0,1,1,1,
+ 1,0,0,0,0,0,0,0,0,1,
+ 1,0,0,0,0,0,0,0,0,1,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,0,0,1,1,1,1,1,1,1,
+ 1,0,0,1,1,1,1,1,1,1,
+ 1,0,0,0,0,0,0,0,0,1,
+ 1,0,0,0,0,0,0,0,0,1,
+ 1,0,0,1,1,1,1,1,1,1,
+ 1,0,0,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,0,0,1,1,1,1,0,0,1,
+ 1,0,0,1,1,1,1,0,0,1,
+ 1,0,0,0,0,1,1,0,0,1,
+ 1,0,0,0,0,1,1,0,0,1,
+ 1,0,0,0,0,0,0,0,0,1,
+ 1,0,0,0,0,0,0,0,0,1,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,0,0,1,1,1,1,1,1,1,
+ 1,0,0,1,1,1,1,1,1,1,
+ 1,0,0,0,0,0,0,0,0,1,
+ 1,0,0,0,0,0,0,0,0,1,
+ 1,0,0,1,1,1,1,1,1,1,
+ 1,0,0,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1
+ };
+
+ Bitmap logo_sprite(logo_sprite_data, 48, 10);
+
UI::UI() {
reset();
}
@@ -71,6 +126,11 @@
return buttonPressedFrame && selected;
}
+ void UI::drawLogo() {
+ Graphics::UI::drawSprite(&logo_sprite, 0, 0);
+ newLine();
+ }
+
void UI::selectNextButton() {
if (buttonCurrentlySelected < buttonCurrentlyDrawing) {
buttonCurrentlySelected++;
