diff options
author | Filippos Karapetis | 2014-10-18 20:19:14 +0300 |
---|---|---|
committer | Filippos Karapetis | 2014-10-18 20:19:14 +0300 |
commit | ad1aedec7687019b44066bc7695f4d227cee1a5b (patch) | |
tree | b1a24009b7589605287fcc6efafe1eaf2b0bd542 /engines/mads | |
parent | f0bcacc7b3ad9bc5bb88b9b7db8d36977e96fa08 (diff) | |
download | scummvm-rg350-ad1aedec7687019b44066bc7695f4d227cee1a5b.tar.gz scummvm-rg350-ad1aedec7687019b44066bc7695f4d227cee1a5b.tar.bz2 scummvm-rg350-ad1aedec7687019b44066bc7695f4d227cee1a5b.zip |
MADS: Implement the Rex Cancel button in the game options dialog
The current options are now saved when the dialog opens, and are
restored to their original values if the user cancels
Diffstat (limited to 'engines/mads')
-rw-r--r-- | engines/mads/nebular/dialogs_nebular.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp index 1900a12b59..6e0e7821ab 100644 --- a/engines/mads/nebular/dialogs_nebular.cpp +++ b/engines/mads/nebular/dialogs_nebular.cpp @@ -1061,6 +1061,14 @@ void OptionsDialog::display() { void OptionsDialog::show() { Nebular::GameNebular &game = *(Nebular::GameNebular *)_vm->_game; + + // Previous options, restored when cancel is selected + bool prevEasyMouse = _vm->_easyMouse; + bool prevInvObjectsAnimated = _vm->_invObjectsAnimated; + bool prevTextWindowStill = _vm->_textWindowStill; + ScreenFade prevScreenFade = _vm->_screenFade; + StoryMode prevStoryMode = game._storyMode; + do { _selectedLine = 0; GameDialog::show(); @@ -1105,10 +1113,15 @@ void OptionsDialog::show() { switch (_selectedLine) { case 8: // Done - // TODO: Copy from temporary config + // New options will be applied break; case 9: // Cancel - // TODO: Ignore all changes to temporary config + // Revert all options from the saved ones + _vm->_easyMouse = prevEasyMouse; + _vm->_invObjectsAnimated = prevInvObjectsAnimated; + _vm->_textWindowStill = prevTextWindowStill; + _vm->_screenFade = prevScreenFade; + game._storyMode = prevStoryMode; break; default: break; |