Update to latest libopenui
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
#include "opentx.h"
|
||||
|
||||
FullScreenDialog::FullScreenDialog(uint8_t type, std::string title, std::string message, std::string action, const std::function<void(void)> & confirmHandler):
|
||||
FormGroup(&mainWindow, {0, 0, LCD_W, LCD_H}, OPAQUE),
|
||||
FormGroup(MainWindow::instance(), {0, 0, LCD_W, LCD_H}, OPAQUE),
|
||||
type(type),
|
||||
title(std::move(title)),
|
||||
message(std::move(message)),
|
||||
@@ -145,7 +145,7 @@ void FullScreenDialog::runForever()
|
||||
WDG_RESET();
|
||||
|
||||
RTOS_WAIT_MS(20);
|
||||
mainWindow.run(false);
|
||||
MainWindow::instance()->run(false);
|
||||
}
|
||||
|
||||
Window::deleteLater();
|
||||
|
||||
@@ -58,19 +58,19 @@
|
||||
|
||||
inline MessageDialog * createPopupInformation(const char * message)
|
||||
{
|
||||
return new MessageDialog(&mainWindow, "Message", message);
|
||||
return new MessageDialog(MainWindow::instance(), "Message", message);
|
||||
}
|
||||
|
||||
inline MessageDialog * createPopupWarning(const char * message)
|
||||
{
|
||||
return new MessageDialog(&mainWindow, "Warning", message);
|
||||
return new MessageDialog(MainWindow::instance(), "Warning", message);
|
||||
}
|
||||
|
||||
inline void POPUP_INFORMATION(const char * message)
|
||||
{
|
||||
auto popup = createPopupInformation(message);
|
||||
while (popup->getParent()) {
|
||||
mainWindow.run(false);
|
||||
MainWindow::instance()->run(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ inline void POPUP_WARNING(const char * message, const char * info = nullptr)
|
||||
popup->setInfoText(std::string(info));
|
||||
}
|
||||
while (popup->getParent()) {
|
||||
mainWindow.run(false);
|
||||
MainWindow::instance()->run(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ void PageHeader::paint(BitmapBuffer * dc)
|
||||
}
|
||||
|
||||
Page::Page(unsigned icon):
|
||||
Window(&mainWindow, {0, 0, LCD_W, LCD_H}, OPAQUE),
|
||||
Window(MainWindow::instance(), {0, 0, LCD_W, LCD_H}, OPAQUE),
|
||||
header(this, icon),
|
||||
body(this, { 0, MENU_HEADER_HEIGHT, LCD_W, LCD_H - MENU_HEADER_HEIGHT }, FORM_FORWARD_FOCUS)
|
||||
{
|
||||
|
||||
@@ -113,7 +113,7 @@ class FlashDialog: public FullScreenDialog
|
||||
device.flashFirmware(filename, [=](const char * title, const char * message, int count, int total) -> void {
|
||||
setMessage(message);
|
||||
progress.setValue(total > 0 ? count * 100 / total : 0);
|
||||
mainWindow.run(false);
|
||||
MainWindow::instance()->run(false);
|
||||
});
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ bool TabsCarousel::onTouchEnd(coord_t x, coord_t y)
|
||||
#endif
|
||||
|
||||
TabsGroup::TabsGroup(uint8_t icon):
|
||||
Window(&mainWindow, { 0, 0, LCD_W, LCD_H }, OPAQUE),
|
||||
Window(MainWindow::instance(), { 0, 0, LCD_W, LCD_H }, OPAQUE),
|
||||
header(this, icon),
|
||||
body(this, { 0, MENU_BODY_TOP, LCD_W, MENU_BODY_HEIGHT }, FORM_FORWARD_FOCUS)
|
||||
{
|
||||
|
||||
@@ -59,7 +59,7 @@ int getMainViewsCount()
|
||||
ViewMain * ViewMain::instance = nullptr;
|
||||
|
||||
ViewMain::ViewMain(bool icons):
|
||||
FormWindow(&mainWindow, { 0, 0, LCD_W, LCD_H })
|
||||
FormWindow(MainWindow::instance(), { 0, 0, LCD_W, LCD_H })
|
||||
{
|
||||
instance = this;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user