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