Library to display menus on TextLCDs. Interaction with functions Up,Down and Select (Buttons or RPG) Based on menu-library from pyeh9
Fork of Menu by
Library to display menus on TextLCDs. Interaction with functions Up,Down and Select (Buttons or RPG) Based on menu-library from pyeh9
Navigator.h
- Committer:
- charly
- Date:
- 2015-01-01
- Revision:
- 3:cfc36b42ae75
- Parent:
- 2:2654dc659298
- Child:
- 4:67097127da6c
File content as of revision 3:cfc36b42ae75:
#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_Base *);
Menu *activeMenu; // the current menu - can change when RPG is pushed on selection with child menu
// RPG rpg;
TextLCD_Base *lcd;
bool lastButton, button;
int direction; // 1 = CW, -1 = CCW
int bottom; // the index of the last item of current menu
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(); // repeatedly call this function to determine if RPG is being used
void moveUp();
void moveDown();
void select();
void printMenu();
void printCursor();
};
#endif
