30 lines
368 B
C++
30 lines
368 B
C++
#ifndef MENU_H
|
|
#define MENU_H
|
|
|
|
#include <Arduino.h>
|
|
#include <U8g2lib.h>
|
|
|
|
enum class MenuAction
|
|
{
|
|
ShowInternetDetails,
|
|
ShowHelloWorld,
|
|
BackToCarousel
|
|
};
|
|
|
|
class Menu
|
|
{
|
|
public:
|
|
Menu();
|
|
void draw(U8G2 &u8g2);
|
|
void nextOption();
|
|
MenuAction select();
|
|
bool consumeDirty();
|
|
void requestRedraw();
|
|
|
|
private:
|
|
size_t selectedIndex_;
|
|
bool dirty_;
|
|
};
|
|
|
|
#endif
|