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
+25
View File
@@ -0,0 +1,25 @@
#include "displaywithtitle.h"
// local includes
#include "tftinstance.h"
namespace espgui {
void DisplayWithTitle::initScreen()
{
Base::initScreen();
m_titleLabel.start();
tft.fillRect(0, 33, tft.width(), 3, TFT_WHITE);
}
void DisplayWithTitle::redraw()
{
Base::redraw();
tft.setTextFont(4);
tft.setTextColor(TFT_YELLOW, TFT_BLACK);
m_titleLabel.redraw(text());
}
} // namespace espgui