diff --git a/src/dialogs/yesno.cpp b/src/dialogs/yesno.cpp index 6fbf6c7..97eea55 100644 --- a/src/dialogs/yesno.cpp +++ b/src/dialogs/yesno.cpp @@ -55,11 +55,12 @@ void drawYesNo(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16 } } -void dialog_prepareYesNoFrame(String text) +void dialog_prepareYesNoFrame(String text, bool defaultResult) { yesnotext = text; done = false; + yesNoResult = defaultResult; ui.goToFrame(ui.getFrameIndex(drawYesNo)); } diff --git a/src/dialogs/yesno.h b/src/dialogs/yesno.h index b907b6c..766b673 100644 --- a/src/dialogs/yesno.h +++ b/src/dialogs/yesno.h @@ -4,7 +4,7 @@ void drawYesNo(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y); -void dialog_prepareYesNoFrame(String text); +void dialog_prepareYesNoFrame(String text, bool defaultResult = false); bool dialog_getYesNoResult(void);