@@ -122,17 +122,21 @@ class SensorEditWindow : public Page {
|
||||
Page(ICON_MODEL_TELEMETRY),
|
||||
index(index)
|
||||
{
|
||||
buildBody(&body);
|
||||
buildHeader(&header);
|
||||
buildBody(&body);
|
||||
}
|
||||
|
||||
protected:
|
||||
uint8_t index;
|
||||
FormWindow * sensorParametersWindow = nullptr;
|
||||
FormGroup * sensorParametersWindow = nullptr;
|
||||
|
||||
void buildHeader(Window * window)
|
||||
{
|
||||
new StaticText(window, {PAGE_TITLE_LEFT, PAGE_TITLE_TOP, LCD_W - PAGE_TITLE_LEFT, PAGE_LINE_HEIGHT}, STR_SENSOR + std::to_string(index + 1), 0, MENU_COLOR);
|
||||
new StaticText(window,
|
||||
{PAGE_TITLE_LEFT, PAGE_TITLE_TOP, LCD_W - PAGE_TITLE_LEFT,
|
||||
PAGE_LINE_HEIGHT},
|
||||
STR_SENSOR + std::to_string(index + 1), 0,
|
||||
MENU_HIGHLIGHT_COLOR);
|
||||
// dynamic display of sensor value ?
|
||||
//new StaticText(window, {70, 28, 100, 20}, "SF" + std::to_string(index), 0, MENU_COLOR);
|
||||
}
|
||||
@@ -321,9 +325,7 @@ class SensorEditWindow : public Page {
|
||||
SET_DIRTY();
|
||||
});
|
||||
|
||||
coord_t delta = sensorParametersWindow->adjustHeight();
|
||||
Window * parent = sensorParametersWindow->getParent();
|
||||
parent->moveWindowsTop(sensorParametersWindow->top(), delta);
|
||||
sensorParametersWindow->adjustHeight();
|
||||
}
|
||||
|
||||
void buildBody(FormWindow * window)
|
||||
@@ -355,7 +357,9 @@ class SensorEditWindow : public Page {
|
||||
});
|
||||
grid.nextLine();
|
||||
|
||||
sensorParametersWindow = new FormWindow(window, {0, grid.getWindowHeight(), LCD_W, 0});
|
||||
sensorParametersWindow = new FormGroup(window, {0, grid.getWindowHeight(), LCD_W, 0},
|
||||
FORM_FORWARD_FOCUS | FORM_NO_BORDER
|
||||
| FORWARD_SCROLL);
|
||||
updateSensorParametersWindow();
|
||||
grid.addWindow(sensorParametersWindow);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user