diff options
Diffstat (limited to 'engines/mohawk/dialogs.cpp')
-rw-r--r-- | engines/mohawk/dialogs.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/mohawk/dialogs.cpp b/engines/mohawk/dialogs.cpp index 492e6104d2..73b1a15300 100644 --- a/engines/mohawk/dialogs.cpp +++ b/engines/mohawk/dialogs.cpp @@ -87,7 +87,7 @@ enum { #ifdef ENABLE_MYST -MystOptionsDialog::MystOptionsDialog(MohawkEngine_Myst* vm) : GUI::Dialog(120, 120, 360, 200), _vm(vm) { +MystOptionsDialog::MystOptionsDialog(MohawkEngine_Myst* vm) : GUI::Dialog(0, 0, 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); @@ -135,6 +135,17 @@ void MystOptionsDialog::open() { _transitionsCheckbox->setState(_vm->_gameState->_globals.transitions); } +void MystOptionsDialog::reflowLayout() { + const int screenW = g_system->getOverlayWidth(); + const int screenH = g_system->getOverlayHeight(); + + // Center the dialog + _x = (screenW - getWidth()) / 2; + _y = (screenH - getHeight()) / 2; + + Dialog::reflowLayout(); +} + void MystOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { case kDropCmd: |