diff options
author | Bastien Bouclet | 2017-02-15 06:30:27 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-03 08:50:10 +0200 |
commit | ad7f94f10f5893ed2ee14f9fc7b48d8ebbce49de (patch) | |
tree | 608650a2ff15536ef988628d1e55c4e65e7fa9c8 /engines | |
parent | aa32c5e5848a92e2b3cb6b08257046767ef1b514 (diff) | |
download | scummvm-rg350-ad7f94f10f5893ed2ee14f9fc7b48d8ebbce49de.tar.gz scummvm-rg350-ad7f94f10f5893ed2ee14f9fc7b48d8ebbce49de.tar.bz2 scummvm-rg350-ad7f94f10f5893ed2ee14f9fc7b48d8ebbce49de.zip |
MOHAWK: Add a transition speed widget to the settings dialog
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mohawk/dialogs.cpp | 11 | ||||
-rw-r--r-- | engines/mohawk/dialogs.h | 3 | ||||
-rw-r--r-- | engines/mohawk/riven.cpp | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/engines/mohawk/dialogs.cpp b/engines/mohawk/dialogs.cpp index 38be98dfec..df832c9a2c 100644 --- a/engines/mohawk/dialogs.cpp +++ b/engines/mohawk/dialogs.cpp @@ -26,6 +26,7 @@ #include "gui/gui-manager.h" #include "gui/saveload.h" #include "gui/widget.h" +#include "gui/widgets/popup.h" #include "common/system.h" #include "common/translation.h" @@ -35,6 +36,7 @@ #ifdef ENABLE_RIVEN #include "mohawk/riven.h" +#include "mohawk/riven_graphics.h" #endif namespace Mohawk { @@ -266,6 +268,13 @@ RivenOptionsDialog::RivenOptionsDialog(MohawkEngine_Riven* vm) : _vm(vm) { _zipModeCheckbox = new GUI::CheckboxWidget(this, 15, 10, 220, 15, _("~Z~ip Mode Activated"), 0, kZipCmd); _waterEffectCheckbox = new GUI::CheckboxWidget(this, 15, 30, 220, 15, _("~W~ater Effect Enabled"), 0, kWaterCmd); + + _transitionModeCaption = new GUI::StaticTextWidget(this, 15, 50, 90, 20, _("Transitions:"), Graphics::kTextAlignRight); + _transitionModePopUp = new GUI::PopUpWidget(this, 115, 50, 120, 20); + _transitionModePopUp->appendEntry(_("Disabled"), kRivenTransitionModeDisabled); + _transitionModePopUp->appendEntry(_("Fastest"), kRivenTransitionModeFastest); + _transitionModePopUp->appendEntry(_("Normal"), kRivenTransitionModeNormal); + _transitionModePopUp->appendEntry(_("Best"), kRivenTransitionModeBest); } RivenOptionsDialog::~RivenOptionsDialog() { @@ -276,6 +285,7 @@ void RivenOptionsDialog::open() { _zipModeCheckbox->setState(_vm->_vars["azip"] != 0); _waterEffectCheckbox->setState(_vm->_vars["waterenabled"] != 0); + _transitionModePopUp->setSelectedTag(_vm->_vars["transitionmode"]); } void RivenOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { @@ -283,6 +293,7 @@ void RivenOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, u case GUI::kOKCmd: _vm->_vars["azip"] = _zipModeCheckbox->getState() ? 1 : 0; _vm->_vars["waterenabled"] = _waterEffectCheckbox->getState() ? 1 : 0; + _vm->_vars["transitionmode"] = _transitionModePopUp->getSelectedTag(); setResult(1); close(); break; diff --git a/engines/mohawk/dialogs.h b/engines/mohawk/dialogs.h index 443f2fb67e..9cbf5ff74c 100644 --- a/engines/mohawk/dialogs.h +++ b/engines/mohawk/dialogs.h @@ -34,6 +34,7 @@ class SaveLoadChooser; class ButtonWidget; class CheckboxWidget; class CommandSender; +class PopUpWidget; class StaticTextWidget; } @@ -143,6 +144,8 @@ private: GUI::CheckboxWidget *_zipModeCheckbox; GUI::CheckboxWidget *_waterEffectCheckbox; + GUI::StaticTextWidget *_transitionModeCaption; + GUI::PopUpWidget *_transitionModePopUp; }; #endif diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp index 16df6a67e6..fcc0f0b752 100644 --- a/engines/mohawk/riven.cpp +++ b/engines/mohawk/riven.cpp @@ -242,6 +242,7 @@ void MohawkEngine_Riven::doFrame() { runDialog(*_optionsDialog); if (_optionsDialog->getLoadSlot() >= 0) loadGameState(_optionsDialog->getLoadSlot()); + _gfx->setTransitionMode((RivenTransitionMode) _vars["transitionmode"]); _card->initializeZipMode(); break; case Common::KEYCODE_r: |