Menu system broken

Dependencies:   ANSITermMenuSystem

Fork of menuSystemMbed by Ryan Scott

Revision:
4:1178a1905490
Parent:
0:a5ece7312edc
Child:
5:92389cf2106d
--- a/MainMenu.cpp	Fri Mar 08 17:37:11 2013 +0000
+++ b/MainMenu.cpp	Tue Apr 16 18:42:03 2013 +0000
@@ -12,8 +12,10 @@
 
 MainMenu::MainMenu()
 {
+    selecteditem = 0;   //April 9th 2013 Ask Brad about Glitch
     highlightedItem = 0;
     maxitems = MAXITEMS;
+    selectionstatus = false;
 }
 
 void MainMenu::setMaxItems(int max)
@@ -30,11 +32,17 @@
 
 void MainMenu::printMenu()
 {
+    const char * msg = Title.c_str();
+    printXY( (char *)msg, 5, 0);
     for (int i = 0; i < maxitems; i++) {
         menuItem[i].print();
     }
 
    menuItem[highlightedItem].highlight();
+   if (selectionstatus == true) 
+   {
+   menuItem[selecteditem].showselect();  //April 9th 2013 Ask Brad about Glitch
+   }
 }
 
 void MainMenu::highlightNextItem()
@@ -68,3 +76,28 @@
             menuItem[i].erase();
             }
 }
+
+void MainMenu::selection()
+{
+    selecteditem = highlightedItem;
+    menuItem[selecteditem].showselect();
+}
+
+void MainMenu::removeselection()
+{
+    menuItem[selecteditem].removeselect();
+}
+
+string MainMenu::getTitle()
+{
+    return Title;
+}
+void MainMenu::setTitle(string NewTitle)
+{
+    Title = NewTitle;
+}
+
+void MainMenu::setselectstatus()
+{
+    selectionstatus = true;
+}
\ No newline at end of file