35 lines
751 B
C
35 lines
751 B
C
|
#ifndef __screen_baseheightentry
|
||
|
#define __screen_baseheightentry
|
||
|
|
||
|
#include "../screen.h"
|
||
|
#include "../control.h"
|
||
|
|
||
|
|
||
|
class BaseHeightEntryScreen : public BaseScreen
|
||
|
{
|
||
|
public:
|
||
|
BaseHeightEntryScreen(ScreenManager* screenManager, Adafruit_GFX* display) : BaseScreen(screenManager, display) { }
|
||
|
|
||
|
void onShow();
|
||
|
void onButton(Button button);
|
||
|
void onTick();
|
||
|
|
||
|
protected:
|
||
|
virtual void initHeights() = 0;
|
||
|
virtual uint16_t getHeight() = 0;
|
||
|
virtual void setHeight(uint16_t value) = 0;
|
||
|
virtual bool nextPage() = 0;
|
||
|
|
||
|
virtual bool isValidHeight() = 0;
|
||
|
virtual const char* getTitle() = 0;
|
||
|
|
||
|
private:
|
||
|
void drawTitle();
|
||
|
void drawSetHeight();
|
||
|
|
||
|
uint16_t lastTextWidth = 0;
|
||
|
uint8_t editingDigit = 0;
|
||
|
};
|
||
|
|
||
|
#endif
|