37 lines
733 B
C++
37 lines
733 B
C++
// DisplayHandler.h
|
|
#ifndef DisplayHandler_h
|
|
#define DisplayHandler_h
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <array>
|
|
#include "Gate.h"
|
|
|
|
|
|
class DisplayHandler {
|
|
private:
|
|
char buffer[32];
|
|
uint8_t currentScreen;
|
|
std::string screens[7];
|
|
std::array<std::string, 5> out_pages = {"Exit", "Mod", "Width", "Prob", "Mute"};
|
|
bool onOutScreen = 0;
|
|
void renderMainPage();
|
|
void renderOutPage();
|
|
|
|
|
|
public:
|
|
DisplayHandler(Gate* outputs[]);
|
|
Gate** outputs;
|
|
bool updateScreen;
|
|
int8_t cursorPosition;
|
|
uint8_t mainMaxCursorPosition;
|
|
uint8_t outMaxCursorPosition;
|
|
int8_t currentOut;
|
|
bool cursorClick;
|
|
void setup();
|
|
void render();
|
|
void handleClick();
|
|
void moveCursor(bool dir = 1);
|
|
};
|
|
|
|
#endif
|