Made UI a bit better, fix for landscape
This commit is contained in:
@ -8,15 +8,24 @@ void ChangeValueDisplayInterface::initScreen()
|
|||||||
{
|
{
|
||||||
Base::initScreen();
|
Base::initScreen();
|
||||||
|
|
||||||
tft.drawRect(25, 75, 190, 65, TFT_WHITE);
|
tft.drawRoundRect(35, 65, 190, 65, 8, TFT_WHITE);
|
||||||
m_valueLabel.start();
|
m_valueLabel.start();
|
||||||
|
|
||||||
tft.setTextFont(4);
|
tft.setTextFont(4);
|
||||||
tft.setTextColor(TFT_WHITE);
|
tft.setTextColor(TFT_WHITE);
|
||||||
tft.drawString("Change value and", 10, 160);
|
if (espgui::isLandscape())
|
||||||
tft.drawString("press button to", 10, 185);
|
{
|
||||||
tft.drawString("confirm and go", 10, 210);
|
tft.drawString("Change value and press", 10, 152);
|
||||||
tft.drawString("back.", 10, 235);
|
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<>
|
template<>
|
||||||
|
@ -33,7 +33,7 @@ public:
|
|||||||
virtual void setShownValue(int value) = 0;
|
virtual void setShownValue(int value) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Label m_valueLabel{26, 81}; // 188, 53
|
Label m_valueLabel{36, 71}; // 188, 53
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename Tvalue>
|
template<typename Tvalue>
|
||||||
|
Reference in New Issue
Block a user