MOHAWK: MystOptionsDialog should not subclass GUI::OptionsDialog

This commit is contained in:
Bastien Bouclet 2016-02-20 14:30:17 +01:00
parent b12cb7308a
commit c3c09a1c83
2 changed files with 10 additions and 6 deletions

View File

@ -87,7 +87,7 @@ enum {
#ifdef ENABLE_MYST
MystOptionsDialog::MystOptionsDialog(MohawkEngine_Myst* vm) : GUI::OptionsDialog("", 120, 120, 360, 200), _vm(vm) {
MystOptionsDialog::MystOptionsDialog(MohawkEngine_Myst* vm) : GUI::Dialog(120, 120, 360, 200), _vm(vm) {
// I18N: Option for fast scene switching
_zipModeCheckbox = new GUI::CheckboxWidget(this, 15, 10, 300, 15, _("~Z~ip Mode Activated"), 0, kZipCmd);
_transitionsCheckbox = new GUI::CheckboxWidget(this, 15, 30, 300, 15, _("~T~ransitions Enabled"), 0, kTransCmd);
@ -144,18 +144,22 @@ void MystOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, ui
case kMapCmd:
_vm->_needsShowMap = true;
close();
break;
break;
case kMenuCmd:
_vm->_needsShowDemoMenu = true;
close();
break;
break;
case GUI::kOKCmd:
_vm->_gameState->_globals.zipMode = _zipModeCheckbox->getState();
_vm->_gameState->_globals.transitions = _transitionsCheckbox->getState();
GUI::OptionsDialog::handleCommand(sender, cmd, data);
setResult(1);
close();
break;
case GUI::kCloseCmd:
close();
break;
default:
GUI::OptionsDialog::handleCommand(sender, cmd, data);
GUI::Dialog::handleCommand(sender, cmd, data);
}
}

View File

@ -70,7 +70,7 @@ public:
class MohawkEngine_Myst;
class MystOptionsDialog : public GUI::OptionsDialog {
class MystOptionsDialog : public GUI::Dialog {
public:
MystOptionsDialog(MohawkEngine_Myst *vm);
~MystOptionsDialog();