fix(color): Restore "go to channel monitor" Button (#2390)

* Restore go to channel monitor go_to_monitor_Button

* Remove unnecessary parameter.
This commit is contained in:
eshifri
2022-09-30 12:26:07 +10:00
committed by GitHub
parent f42166d610
commit 53c91ce8a0
2 changed files with 14 additions and 0 deletions
+11
View File
@@ -61,6 +61,7 @@ ModelMenu::ModelMenu():
#endif
addTab(new ModelTelemetryPage());
addGoToMonitorsButton();
}
void ModelMenu::onEvent(event_t event)
@@ -74,3 +75,13 @@ void ModelMenu::onEvent(event_t event)
}
#endif
}
void ModelMenu::addGoToMonitorsButton()
{
OpenTxTheme::instance()->createTextButton(
&header, {LCD_W / 2 + 6, MENU_TITLE_TOP + 1, LCD_W / 2 - 8, MENU_TITLE_HEIGHT - 2},
STR_OPEN_CHANNEL_MONITORS, [=]() {
pushEvent(EVT_KEY_FIRST(KEY_MODEL));
return 0;
});
}
+3
View File
@@ -34,6 +34,9 @@ class ModelMenu : public TabsGroup
#if defined(DEBUG_WINDOWS)
std::string getName() const override { return "ModelMenu"; }
#endif
protected:
void addGoToMonitorsButton(void);
};
#endif // _MENU_MODEL_H_