added function for avoid print parentmenu

This commit is contained in:
2023-01-04 02:30:43 +01:00
parent bc7379ae7e
commit 2154e3d012
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -187,7 +187,7 @@ void MenuIntInput::no() {
void MenuIntInput::yes() {
this->wrapper->action(this->values, this->length);
if (this->parentMenu)
if (this->parentMenu && printParentMenu)
this->parentMenu->printMenu();
}
+3
View File
@@ -38,6 +38,7 @@ class MenuIntInput : public MenuControl {
void setMinMax(int16_t min, int16_t max);
void setMinMaxSteps(uint8_t valueNumber, int16_t min, int16_t max, uint8_t steps);
void setMinMaxSteps(int16_t min, int16_t max, uint8_t steps);
void setPrintParentMenu(bool b) { this->printParentMenu = b; }
void setStepsPerInput(uint8_t valueNumber, uint8_t steps);
void setStepsPerInput(uint8_t steps);
@@ -85,6 +86,8 @@ class MenuIntInput : public MenuControl {
private:
MenuIntInputWrapper* wrapper;
bool printParentMenu = true;
uint8_t currentPosition = 0;
uint8_t length;
uint8_t *stepsPerInput;