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.
Dependents: class_project_main
Fork of SerialLCD_Menu by
Diff: Navigator.h
- Revision:
- 1:84d263c8932d
- Child:
- 2:2654dc659298
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Navigator.h Tue Mar 05 20:33:27 2013 +0000
@@ -0,0 +1,34 @@
+#ifndef NAVIGATOR_H
+#define NAVIGATOR_H
+
+#include "mbed.h"
+#include "Menu.h"
+#include "TextLCD.h"
+#include "RPG.h"
+
+class Navigator {
+ private:
+
+ public:
+ //Navigator(Menu &, RPG &, TextLCD &);
+ Navigator(Menu *root, RPG &, TextLCD *lcd);
+ Menu *activeMenu;
+ RPG rpg;
+ TextLCD *lcd;
+
+ bool lastButton, button;
+ int direction;
+
+ int bottom;
+ int cursorPos; // what selection the cursor points to
+ int cursorLine; // what line of the lcd the cursor is on. 1 = first line, 2 = second line
+
+ void poll();
+ void moveUp();
+ void moveDown();
+ void printMenu();
+ void printCursor();
+ void update();
+};
+
+#endif
\ No newline at end of file
