diff options
author | Bastien Bouclet | 2018-05-17 20:46:42 +0200 |
---|---|---|
committer | Bastien Bouclet | 2018-05-17 20:49:28 +0200 |
commit | 6798f9c77ebe9c436c16cd1525554eb49bc1ba1d (patch) | |
tree | 3a6d86bb9759ecc5a09e1fe47ebf54d080e076d8 /engines/mohawk/dialogs.cpp | |
parent | 44fd44ccc965b91a38c534e0a890772e83577c4b (diff) | |
download | scummvm-rg350-6798f9c77ebe9c436c16cd1525554eb49bc1ba1d.tar.gz scummvm-rg350-6798f9c77ebe9c436c16cd1525554eb49bc1ba1d.tar.bz2 scummvm-rg350-6798f9c77ebe9c436c16cd1525554eb49bc1ba1d.zip |
MOHAWK: Don't allow displaying the map when the game is not interactive
Fixes Trac#10526 and Trac#10531.
Diffstat (limited to 'engines/mohawk/dialogs.cpp')
-rw-r--r-- | engines/mohawk/dialogs.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/engines/mohawk/dialogs.cpp b/engines/mohawk/dialogs.cpp index f181db8707..5700a4641b 100644 --- a/engines/mohawk/dialogs.cpp +++ b/engines/mohawk/dialogs.cpp @@ -204,16 +204,19 @@ MystOptionsDialog::~MystOptionsDialog() { void MystOptionsDialog::open() { MohawkOptionsDialog::open(); - _dropPageButton->setEnabled(_vm->_gameState->_globals.heldPage != kNoPage); + bool canDropPage = _vm->isInteractive() && _vm->_gameState->_globals.heldPage != kNoPage; + _dropPageButton->setEnabled(canDropPage); - if (_showMapButton) - _showMapButton->setEnabled(_vm->_scriptParser && - _vm->_scriptParser->getMap()); + if (_showMapButton) { + bool canShowMap = _vm->isInteractive() && _vm->_scriptParser->getMap(); + _showMapButton->setEnabled(canShowMap); + } - // Return to menu button is not enabled on the menu - if (_returnToMenuButton) - _returnToMenuButton->setEnabled(_vm->_scriptParser && - _vm->getCurStack() != kDemoStack); + if (_returnToMenuButton) { + // Return to menu button is not enabled on the menu + bool canReturnToMenu = _vm->isInteractive() && _vm->getCurStack() != kDemoStack; + _returnToMenuButton->setEnabled(canReturnToMenu); + } // Zip mode is disabled in the demo if (_vm->getFeatures() & GF_DEMO) |