Complete rewrite of Application
This commit is contained in:
37
Menu.h
Normal file
37
Menu.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user