Made UI a bit better, fix for landscape
This commit is contained in:
@ -8,16 +8,25 @@ 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);
|
||||
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<>
|
||||
void ChangeValueDisplay<float>::redraw()
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user