Moznost nastavit defaultni vysledek z YesNo dialogu
This commit is contained in:
parent
0445129e48
commit
ab95c7e60d
@ -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;
|
yesnotext = text;
|
||||||
done = false;
|
done = false;
|
||||||
|
yesNoResult = defaultResult;
|
||||||
ui.goToFrame(ui.getFrameIndex(drawYesNo));
|
ui.goToFrame(ui.getFrameIndex(drawYesNo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
void drawYesNo(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y);
|
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);
|
bool dialog_getYesNoResult(void);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user