SCUMM: Optionally ask before clearing series IQ score in Indy 3 Mac

According to the manual, "You will be given a chance to change your
mind" when clicking on the "Reset Series IQ button". I've never seen the
original do that, but I like the idea so let's add it as an enhancement.

(NB: Resetting the IQ score currently does not work properly.)
This commit is contained in:
Torbjörn Andersson 2024-05-19 00:09:47 +02:00
parent f9765abc2d
commit ada0a4c0b9

View File

@ -1574,9 +1574,11 @@ bool MacIndy3Gui::runIqPointsDialog() {
break;
if (clicked == 1) {
((ScummEngine_v4 *)_vm)->clearSeriesIQPoints();
window->replaceSubstitution(1, Common::String::format("%d", _vm->VAR(245)));
window->redrawWidget(4);
if (!_vm->enhancementEnabled(kEnhUIUX) || runOkCancelDialog("Are you sure you want to reset the series IQ score?")) {
((ScummEngine_v4 *)_vm)->clearSeriesIQPoints();
window->replaceSubstitution(1, Common::String::format("%d", _vm->VAR(245)));
window->redrawWidget(4);
}
}
}