Fix Select Screen cancel destination

This commit is contained in:
Scott Lahteine
2020-08-21 02:41:33 -05:00
parent 7807b613d5
commit bf316d9ec5
5 changed files with 11 additions and 7 deletions

View File

@@ -412,7 +412,10 @@ void MenuItem_confirm::select_screen(
const bool ui_selection = ui.update_selection(), got_click = ui.use_click();
if (got_click || ui.should_draw()) {
draw_select_screen(yes, no, ui_selection, pref, string, suff);
if (got_click) { ui_selection ? yesFunc() : noFunc(); }
if (got_click) {
selectFunc_t callFunc = ui_selection ? yesFunc : noFunc;
if (callFunc) callFunc(); else ui.goto_previous_screen();
}
ui.defer_status_screen();
}
}