MYST3: Don't allow clicking away modal dialogs

Also prevent escape from closing modal dialogs without executing any
action.

Fixes #1447, Fixes #1457.
This commit is contained in:
Bastien Bouclet 2018-06-30 13:41:43 +02:00
parent a03cdea52d
commit 2f756b92e7

View File

@ -151,11 +151,15 @@ int16 ButtonsDialog::update() {
}
}
} else if (event.type == Common::EVENT_LBUTTONDOWN) {
return _frameToDisplay;
if (_frameToDisplay > 0) {
return _frameToDisplay;
} else {
_vm->_sound->playEffect(697, 5);
}
} else if (event.type == Common::EVENT_KEYDOWN) {
switch (event.kbd.keycode) {
case Common::KEYCODE_ESCAPE:
return -1;
return _buttonCount;
default:
break;
}