mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-02 07:28:32 +00:00
MOHAWK: Add a transition speed widget to the settings dialog
This commit is contained in:
parent
aa32c5e584
commit
ad7f94f10f
engines/mohawk
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user