Made UI a bit better, fix for landscape

This commit is contained in:
CommanderRedYT
2022-06-13 17:58:33 +02:00
parent 80e45d368e
commit 0c6f3df4f7
2 changed files with 15 additions and 6 deletions

View File

@ -8,15 +8,24 @@ void ChangeValueDisplayInterface::initScreen()
{
Base::initScreen();
tft.drawRect(25, 75, 190, 65, TFT_WHITE);
tft.drawRoundRect(35, 65, 190, 65, 8, TFT_WHITE);
m_valueLabel.start();
tft.setTextFont(4);
tft.setTextColor(TFT_WHITE);
tft.drawString("Change value and", 10, 160);
tft.drawString("press button to", 10, 185);
tft.drawString("confirm and go", 10, 210);
tft.drawString("back.", 10, 235);
if (espgui::isLandscape())
{
tft.drawString("Change value and press", 10, 152);
tft.drawString("button to confirm and", 10, 177);
tft.drawString("go back", 10, 202);
}
else
{
tft.drawString("Change value and", 10, 160);
tft.drawString("press button to", 10, 185);
tft.drawString("confirm and go", 10, 210);
tft.drawString("back.", 10, 235);
}
}
template<>

View File

@ -33,7 +33,7 @@ public:
virtual void setShownValue(int value) = 0;
protected:
Label m_valueLabel{26, 81}; // 188, 53
Label m_valueLabel{36, 71}; // 188, 53
};
template<typename Tvalue>