added config screen, added game

This commit is contained in:
2022-04-14 17:01:26 +02:00
parent e9582a6dbf
commit 89561ba8d9
18 changed files with 1163 additions and 152 deletions

View File

@@ -0,0 +1,40 @@
#pragma once
#include "Arduino.h"
#include <vector>
#include "display_types.h"
#include "display_draw.h"
#include "display_buttons.h"
#include "measure_mode.h"
#define MINSCREENSWITCHDELAY 1000
void setDisplayState(e_displayState newstate);
e_displayState getDisplayState(void);
class screen_c
{
std::vector<c_onScreenButton*> _items;
const e_displayState _thisScreen;
const uint8_t _buttonCount;
bool _initialized = false;
public:
screen_c(e_displayState thisScreen, uint8_t buttonCount):_thisScreen(thisScreen), _buttonCount(buttonCount)
{}
void addItem(c_onScreenButton* pButton)
{
_items.push_back(pButton);
}
void begin(void);
void handle(void);
void draw(void);
void activateModeButton(void);
};