Added DisplayWithTitle

This commit is contained in:
2021-11-01 22:21:29 +01:00
parent 1bf5aec0fd
commit aad3fcedcb
9 changed files with 102 additions and 38 deletions
+5 -8
View File
@@ -1,13 +1,12 @@
#include "changevaluedisplay.h"
// 3rdparty lib includes
#include <fmt/core.h>
namespace espgui {
void ChangeValueDisplayInterface::initScreen()
{
tft.fillScreen(TFT_BLACK);
m_titleLabel.start();
tft.fillRect(0, 33, tft.width(), 3, TFT_WHITE);
Base::initScreen();
tft.drawRect(25, 75, 190, 65, TFT_WHITE);
m_valueLabel.start();
@@ -23,9 +22,7 @@ void ChangeValueDisplayInterface::initScreen()
template<>
void ChangeValueDisplay<float>::redraw()
{
tft.setTextFont(4);
tft.setTextColor(TFT_YELLOW);
m_titleLabel.redraw(text());
Base::redraw();
tft.setTextColor(TFT_WHITE, TFT_BLACK);
tft.setTextFont(7);