2021-11-01 22:21:29 +01:00
|
|
|
#include "displaywithtitle.h"
|
|
|
|
|
|
|
|
|
|
// local includes
|
2022-12-01 19:50:29 +01:00
|
|
|
#include "tftinterface.h"
|
|
|
|
|
#include "tftcolors.h"
|
2021-11-01 22:21:29 +01:00
|
|
|
|
|
|
|
|
namespace espgui {
|
|
|
|
|
|
2022-12-01 19:50:29 +01:00
|
|
|
void DisplayWithTitle::initScreen(TftInterface &tft)
|
2021-11-01 22:21:29 +01:00
|
|
|
{
|
2022-12-01 19:50:29 +01:00
|
|
|
Base::initScreen(tft);
|
2021-11-01 22:21:29 +01:00
|
|
|
|
2022-12-01 19:50:29 +01:00
|
|
|
m_titleLabel.start(tft);
|
2021-11-01 22:21:29 +01:00
|
|
|
tft.fillRect(0, 33, tft.width(), 3, TFT_WHITE);
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-01 19:50:29 +01:00
|
|
|
void DisplayWithTitle::redraw(TftInterface &tft)
|
2021-11-01 22:21:29 +01:00
|
|
|
{
|
2022-12-01 19:50:29 +01:00
|
|
|
Base::redraw(tft);
|
2021-11-01 22:21:29 +01:00
|
|
|
|
2023-01-10 17:41:03 +01:00
|
|
|
m_titleLabel.redraw(tft, title(), TFT_YELLOW, TFT_BLACK, 4);
|
2021-11-01 22:21:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace espgui
|