ELEC2645 (2018/19) / Mbed 2 deprecated el17ajf

Dependencies:   mbed

Fork of el17ajf by Angus Findlay

Committer:
el17ajf
Date:
Fri Apr 05 17:16:59 2019 +0000
Revision:
27:2ed9e3c9f4e9
Parent:
25:bf47fe41883a
Child:
30:11838cb6979f
Highscores working

Who changed what in which revision?

UserRevisionLine numberNew contents of line
el17ajf 21:62d2b5b73160 1 #ifndef UI_H
el17ajf 21:62d2b5b73160 2 #define UI_H
el17ajf 16:3f84f2d7b910 3
el17ajf 21:62d2b5b73160 4 namespace Menus {
el17ajf 21:62d2b5b73160 5 class UI {
el17ajf 21:62d2b5b73160 6 public:
el17ajf 21:62d2b5b73160 7 UI();
el17ajf 21:62d2b5b73160 8 ~UI();
el17ajf 21:62d2b5b73160 9
el17ajf 21:62d2b5b73160 10 void reset();
el17ajf 21:62d2b5b73160 11 void clear();
el17ajf 21:62d2b5b73160 12
el17ajf 21:62d2b5b73160 13 void drawTitle(const char * text);
el17ajf 21:62d2b5b73160 14 void drawLabel(const char * text);
el17ajf 27:2ed9e3c9f4e9 15 void drawFlashingLabel(const char * text);
el17ajf 21:62d2b5b73160 16 bool drawAndCheckButton(const char * text);
el17ajf 21:62d2b5b73160 17
el17ajf 21:62d2b5b73160 18 void selectNextButton();
el17ajf 21:62d2b5b73160 19 void selectPreviousButton();
el17ajf 21:62d2b5b73160 20 void pressButton();
el17ajf 21:62d2b5b73160 21 void newLine();
el17ajf 21:62d2b5b73160 22
el17ajf 21:62d2b5b73160 23 private:
el17ajf 25:bf47fe41883a 24 static const int PADDING_X = 3;
el17ajf 25:bf47fe41883a 25 static const int PADDING_Y = 3;
el17ajf 25:bf47fe41883a 26 static const int LINE_PADDING = 3;
el17ajf 21:62d2b5b73160 27 int nextYPos;
el17ajf 21:62d2b5b73160 28 int nextY();
el17ajf 21:62d2b5b73160 29 int buttonCurrentlySelected;
el17ajf 21:62d2b5b73160 30 int buttonCurrentlyDrawing;
el17ajf 21:62d2b5b73160 31 bool buttonPressedFrame;
el17ajf 27:2ed9e3c9f4e9 32 int frame;
el17ajf 21:62d2b5b73160 33 };
el17ajf 21:62d2b5b73160 34 };
el17ajf 21:62d2b5b73160 35 #endif