added factory code, and the beginnings of styling
This commit is contained in:
committed by
Raphael Coeffic
parent
169dd1219d
commit
7271c4f730
@@ -25,10 +25,14 @@
|
||||
#include "opentx.h"
|
||||
#include "libopenui.h"
|
||||
|
||||
LvglWidgetFactory fullScreenDialogFactory = LvglWidgetFactory([] (lv_obj_t *parent) {
|
||||
return lv_obj_create(nullptr);
|
||||
});
|
||||
|
||||
FullScreenDialog::FullScreenDialog(
|
||||
uint8_t type, std::string title, std::string message, std::string action,
|
||||
const std::function<void(void)>& confirmHandler) :
|
||||
FormGroup(MainWindow::instance(), {0, 0, LCD_W, LCD_H}, OPAQUE, true),
|
||||
FormGroup(MainWindow::instance(), {0, 0, LCD_W, LCD_H}, OPAQUE, &fullScreenDialogFactory),
|
||||
type(type),
|
||||
title(std::move(title)),
|
||||
message(std::move(message)),
|
||||
|
||||
@@ -161,7 +161,7 @@ class SetupWidgetsPage: public FormWindow
|
||||
{
|
||||
public:
|
||||
SetupWidgetsPage(ScreenMenu* menu, uint8_t customScreenIdx):
|
||||
FormWindow(ViewMain::instance(), {0, 0, 0, 0}, FORM_FORWARD_FOCUS,true),
|
||||
FormWindow(ViewMain::instance(), {0, 0, 0, 0}, FORM_FORWARD_FOCUS),
|
||||
menu(menu),
|
||||
customScreenIdx(customScreenIdx)
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ Topbar * TopbarFactory::create(Window * parent)
|
||||
}
|
||||
|
||||
SetupTopBarWidgetsPage::SetupTopBarWidgetsPage(ScreenMenu* menu):
|
||||
FormWindow(ViewMain::instance(), {0, 0, 0, 0}, FORM_FORWARD_FOCUS, true),
|
||||
FormWindow(ViewMain::instance(), {0, 0, 0, 0}, FORM_FORWARD_FOCUS),
|
||||
menu(menu)
|
||||
{
|
||||
// remember focus
|
||||
|
||||
Reference in New Issue
Block a user