Library implementing menu system, with RPG interface, navigator system

Dependencies:   Menu RPG TextLCD mbed

Revision:
0:10b365b7873b
Child:
2:202735df93cd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/notes.h	Thu Feb 28 22:19:56 2013 +0000
@@ -0,0 +1,41 @@
+/*
+struct dirent *p;
+    DIR *d = opendir("/sd/mydir");
+    char line[80];
+    string filename;
+    
+    while((p = readdir(d)) != NULL){
+        menu.push_back(p->d_name);
+    }
+
+*/
+//lcd.printf("%s\n", test.getText());
+    
+    /*lcd.printf(">%s\n", menu[cursor].c_str()); 
+    lcd.printf(" %s", menu[cursor+1].c_str());
+    while(1){
+        if((dirt = rpg1.dir())!=0){ //Get Dir
+            wait(0.15);
+            cursor = cursor + dirt; //Ad Dir to count
+            if(cursor < 0) cursor = 0;
+            else if(cursor > 8) cursor = 8;
+            lcd.cls();
+            lcd.printf(">%s\n", menu[cursor].c_str()); 
+            lcd.printf(" %s", menu[cursor+1].c_str());
+        }
+        
+        if (rpg1.pb()){
+            wait(0.25);
+            lcd.cls();
+            filename = "/sd/mydir/"+menu[cursor];
+            //lcd.printf("%s\n", filename);
+            FILE *fp = fopen(filename.c_str(), "r");
+            if(fp == NULL) {
+                error("Could not open file for reading\n");
+            }
+            fgets(line, 80, fp);
+            lcd.printf("%s\n", line);
+            fclose(fp);
+        }
+    }
+    */
\ No newline at end of file