user config

Fork of Menu by Peihsun Yeh

required for StormXalike

Committer:
rakware
Date:
Thu Mar 05 17:38:35 2015 +0000
Revision:
3:742c6553f5f7
Parent:
Navigator.h@2:2654dc659298
user config

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pyeh9 1:84d263c8932d 1 #ifndef NAVIGATOR_H
pyeh9 1:84d263c8932d 2 #define NAVIGATOR_H
pyeh9 1:84d263c8932d 3
pyeh9 1:84d263c8932d 4 #include "mbed.h"
pyeh9 1:84d263c8932d 5 #include "Menu.h"
pyeh9 1:84d263c8932d 6 #include "TextLCD.h"
pyeh9 1:84d263c8932d 7 #include "RPG.h"
pyeh9 1:84d263c8932d 8
pyeh9 1:84d263c8932d 9 class Navigator {
pyeh9 1:84d263c8932d 10 private:
pyeh9 1:84d263c8932d 11
pyeh9 1:84d263c8932d 12 public:
pyeh9 2:2654dc659298 13 Navigator(Menu *, RPG &, TextLCD *);
pyeh9 2:2654dc659298 14 Menu *activeMenu; // the current menu - can change when RPG is pushed on selection with child menu
pyeh9 1:84d263c8932d 15 RPG rpg;
pyeh9 1:84d263c8932d 16 TextLCD *lcd;
pyeh9 1:84d263c8932d 17
pyeh9 1:84d263c8932d 18 bool lastButton, button;
pyeh9 2:2654dc659298 19 int direction; // 1 = CW, -1 = CCW
pyeh9 1:84d263c8932d 20
pyeh9 2:2654dc659298 21 int bottom; // the index of the last item of current menu
pyeh9 2:2654dc659298 22 int cursorPos; // what selection the cursor points to
pyeh9 1:84d263c8932d 23 int cursorLine; // what line of the lcd the cursor is on. 1 = first line, 2 = second line
pyeh9 1:84d263c8932d 24
pyeh9 2:2654dc659298 25 void poll(); // repeatedly call this function to determine if RPG is being used
pyeh9 1:84d263c8932d 26 void moveUp();
pyeh9 1:84d263c8932d 27 void moveDown();
pyeh9 1:84d263c8932d 28 void printMenu();
pyeh9 1:84d263c8932d 29 void printCursor();
pyeh9 1:84d263c8932d 30 };
pyeh9 1:84d263c8932d 31
pyeh9 1:84d263c8932d 32 #endif