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 Peihsun Yeh

Library to display menus on TextLCDs. Interaction with functions Up,Down and Select (Buttons or RPG) Based on menu-library from pyeh9

Revision:
4:67097127da6c
Parent:
3:cfc36b42ae75
Child:
5:91b1bc68290b
diff -r cfc36b42ae75 -r 67097127da6c Navigator.cpp
--- a/Navigator.cpp	Thu Jan 01 22:27:30 2015 +0000
+++ b/Navigator.cpp	Thu Jan 01 23:00:06 2015 +0000
@@ -1,12 +1,10 @@
 #include "Navigator.h"
 
-Navigator::Navigator(Menu *root, /*RPG &rpg,*/ TextLCD_Base *lcd) : activeMenu(root), /*rpg(rpg), */ lcd(lcd) 
+Navigator::Navigator(Menu *root, TextLCD_Base *lcd) : activeMenu(root), lcd(lcd) 
 {
     bottom = root->selections.size();
     cursorPos = 0;
     cursorLine = 1;
-    button = 0;
-    lastButton = 0;
     
     printMenu();
     printCursor();
@@ -49,29 +47,7 @@
 
 void Navigator::poll()
 {
-/*    
-    if((direction = rpg.dir())!=0){ //Get Dir
-        wait(0.2); 
-        if(direction == 1) moveDown();
-        else if(direction == -1) moveUp();
-    }
-       
-    if ((button = rpg.pb()) && !lastButton){ //prevents multiple selections when button is held down
-        wait(0.2);
-        if(activeMenu->selections[cursorPos].fun != NULL){
-            (activeMenu->selections[cursorPos].fun)();
-        }
-        if(activeMenu->selections[cursorPos].childMenu != NULL){
-            activeMenu = activeMenu->selections[cursorPos].childMenu;
-            bottom = activeMenu->selections.size();
-            cursorPos = 0;
-            cursorLine = 1;
-            printMenu();
-            printCursor();
-        }
-    }
-    lastButton = button;
-*/    
+ // no longer needed
 }
 
 void Navigator::select()