37 lines
471 B
C++
37 lines
471 B
C++
#ifndef MENU_H
|
|
#define MENU_H
|
|
|
|
#include <Arduino.h>
|
|
|
|
enum MenuType {
|
|
MENU_MAIN,
|
|
MENU_SETUP,
|
|
};
|
|
|
|
class Menu {
|
|
private:
|
|
MenuType type;
|
|
int index;
|
|
|
|
static const int MAIN_SIZE = 3;
|
|
static const int SETUP_SIZE = 3;
|
|
|
|
const char* getItem(MenuType type, int index);
|
|
int getSize(MenuType type);
|
|
|
|
public:
|
|
Menu();
|
|
|
|
void next();
|
|
void prev();
|
|
|
|
void enter();
|
|
void back();
|
|
|
|
const char* getCurrent();
|
|
const char* getNext();
|
|
|
|
MenuType getType();
|
|
};
|
|
|
|
#endif |