ELEC2645 (2018/19) / Mbed 2 deprecated el17ajf

Dependencies:   mbed

Fork of el17ajf by Angus Findlay

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