Merge pull request #707 from jfrickmann/LuaWidgets

Add lcd.exitFullScreen(), removed full screen message
This commit is contained in:
Peter Feerick
2021-09-12 10:57:26 +10:00
committed by GitHub
5 changed files with 35 additions and 28 deletions
-7
View File
@@ -30,7 +30,6 @@
#endif
constexpr uint32_t WIDGET_FOCUS_TIMEOUT = 10*1000; // 10 seconds
constexpr uint32_t FULLSCREEN_HINT_DELAY = 5*1000; // 5 seconds
static void openWidgetMenu(Widget * parent)
{
@@ -125,11 +124,6 @@ void Widget::paint(BitmapBuffer * dc)
}
dc->drawRect(0, 0, width(), height(), 2, STASHED, COLOR_THEME_FOCUS);
}
if (fullscreen && (RTOS_GET_MS() - fsStartedTS < FULLSCREEN_HINT_DELAY)) {
dc->drawText(width() / 2, height() / 2, "Press [RTN] long to exit",
FONT(XL) | CENTERED | VCENTERED | COLOR_THEME_PRIMARY3);
}
}
#if defined(HARDWARE_KEYS)
@@ -186,7 +180,6 @@ void Widget::setFullscreen(bool fullscreen)
setRect(parent->getRect());
setLeft(parent->getScrollPositionX());
this->fullscreen = true;
fsStartedTS = RTOS_GET_MS();
bringToTop();
}
}
-1
View File
@@ -111,7 +111,6 @@ class Widget : public Button
PersistentData * persistentData;
uint32_t focusGainedTS = 0;
bool fullscreen = false;
uint32_t fsStartedTS = 0;
};
void registerWidget(const WidgetFactory * factory);