aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Bouclet2016-07-04 19:28:14 +0200
committerBastien Bouclet2016-07-04 20:47:16 +0200
commit0c57c99f0026be1ef9fe3a575c18de070a2bf1cc (patch)
tree2d5ce923943bbb343e7bd3fd488d514683285e16
parentee41f6456e62e494bf073e1d584c71b29d6e2cb8 (diff)
downloadscummvm-rg350-0c57c99f0026be1ef9fe3a575c18de070a2bf1cc.tar.gz
scummvm-rg350-0c57c99f0026be1ef9fe3a575c18de070a2bf1cc.tar.bz2
scummvm-rg350-0c57c99f0026be1ef9fe3a575c18de070a2bf1cc.zip
MOHAWK: Change the Riven options dialog not to subclass GUI::OptionsDialog
-rw-r--r--engines/mohawk/dialogs.cpp8
-rw-r--r--engines/mohawk/dialogs.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/engines/mohawk/dialogs.cpp b/engines/mohawk/dialogs.cpp
index 6c6ae9e77f..2d49b13ee5 100644
--- a/engines/mohawk/dialogs.cpp
+++ b/engines/mohawk/dialogs.cpp
@@ -235,7 +235,7 @@ void MystOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, ui
#ifdef ENABLE_RIVEN
-RivenOptionsDialog::RivenOptionsDialog(MohawkEngine_Riven* vm) : GUI::OptionsDialog("", 120, 120, 360, 200), _vm(vm) {
+RivenOptionsDialog::RivenOptionsDialog(MohawkEngine_Riven* vm) : GUI::Dialog(120, 120, 360, 200), _vm(vm) {
_zipModeCheckbox = new GUI::CheckboxWidget(this, 15, 10, 300, 15, _("~Z~ip Mode Activated"), 0, kZipCmd);
_waterEffectCheckbox = new GUI::CheckboxWidget(this, 15, 30, 300, 15, _("~W~ater Effect Enabled"), 0, kWaterCmd);
@@ -261,11 +261,15 @@ void RivenOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, u
case kWaterCmd:
_vm->_vars["waterenabled"] = _waterEffectCheckbox->getState() ? 1 : 0;
break;
+ case GUI::kOKCmd:
+ setResult(1);
+ close();
+ break;
case GUI::kCloseCmd:
close();
break;
default:
- GUI::OptionsDialog::handleCommand(sender, cmd, data);
+ GUI::Dialog::handleCommand(sender, cmd, data);
}
}
diff --git a/engines/mohawk/dialogs.h b/engines/mohawk/dialogs.h
index 59b3e01fb7..6c9862e43f 100644
--- a/engines/mohawk/dialogs.h
+++ b/engines/mohawk/dialogs.h
@@ -110,7 +110,7 @@ private:
class MohawkEngine_Riven;
-class RivenOptionsDialog : public GUI::OptionsDialog {
+class RivenOptionsDialog : public GUI::Dialog {
public:
RivenOptionsDialog(MohawkEngine_Riven *vm);
~RivenOptionsDialog();