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
Menu.cpp
- Committer:
- charly
- Date:
- 2015-01-16
- Revision:
- 8:fbaeab73fe1a
- Parent:
- 6:819049708d51
- Child:
- 9:c9df0b33d176
File content as of revision 8:fbaeab73fe1a:
#include "mbed.h"
#include "Menu.h"
#include "Selection.h"
Menu::Menu(char *id) : menuID(id)
{
selections.clear();
CurrentSelection = 0;
}
void Menu::add(const Selection &toAdd)
{
selections.push_back(toAdd);
}
void Menu::changeText(int position, char *newText)
{
if ((position >=0) && (position <= selections.size())) {
selections[position].selText = newText;
}
}
