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.h
- Revision:
- 21:62d2b5b73160
- Parent:
- 17:cc448ab7266f
- Child:
- 25:bf47fe41883a
--- a/Menus/UI/UI.h Wed Apr 03 17:25:15 2019 +0000
+++ b/Menus/UI/UI.h Wed Apr 03 20:33:27 2019 +0000
@@ -1,27 +1,33 @@
-class UI {
-public:
- UI();
- ~UI();
-
- void reset();
- void clear();
-
- void drawTitle(const char * text);
- void drawLabel(const char * text);
- bool drawAndCheckButton(const char * text);
+#ifndef UI_H
+#define UI_H
- void selectNextButton();
- void selectPreviousButton();
- void pressButton();
- void newLine();
-
-private:
- const int PADDING_X = 3;
- const int PADDING_Y = 3;
- const int LINE_PADDING = 3;
- int nextYPos;
- int nextY();
- int buttonCurrentlySelected;
- int buttonCurrentlyDrawing;
- bool buttonPressedFrame;
-};
\ No newline at end of file
+namespace Menus {
+ class UI {
+ public:
+ UI();
+ ~UI();
+
+ void reset();
+ void clear();
+
+ void drawTitle(const char * text);
+ void drawLabel(const char * text);
+ bool drawAndCheckButton(const char * text);
+
+ void selectNextButton();
+ void selectPreviousButton();
+ void pressButton();
+ void newLine();
+
+ private:
+ const int PADDING_X = 3;
+ const int PADDING_Y = 3;
+ const int LINE_PADDING = 3;
+ int nextYPos;
+ int nextY();
+ int buttonCurrentlySelected;
+ int buttonCurrentlyDrawing;
+ bool buttonPressedFrame;
+ };
+};
+#endif
\ No newline at end of file
