From adbc453163ef1408da4592913e8eda7f71ee1907 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Thu, 12 Feb 2009 22:05:07 +0000 Subject: Fixed working Keys button in in game options dialog Fixed key mappings dialog layout svn-id: r36285 --- engines/dialogs.cpp | 14 +++++++------- engines/scumm/dialogs.cpp | 14 ++++++-------- 2 files changed, 13 insertions(+), 15 deletions(-) (limited to 'engines') diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp index 410b5e8d4d..4f9557306e 100644 --- a/engines/dialogs.cpp +++ b/engines/dialogs.cpp @@ -296,12 +296,6 @@ ConfigDialog::ConfigDialog(bool subtitleControls) #ifdef SMALL_SCREEN_DEVICE new GUI::ButtonWidget(this, "ScummConfig.Keys", "Keys", kKeysCmd, 'K'); - - // - // Create the sub dialog(s) - // - - _keysDialog = new GUI::KeysDialog(); #endif } @@ -316,7 +310,13 @@ void ConfigDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) case kKeysCmd: #ifdef SMALL_SCREEN_DEVICE - _keysDialog->runModal(); + // + // Create the sub dialog(s) + // + _keysDialog = new GUI::KeysDialog(); + _keysDialog->runModal(); + delete _keysDialog; + _keysDialog = NULL; #endif break; default: diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index fc21b10b8d..b193683337 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -591,14 +591,6 @@ ConfigDialog::ConfigDialog() #ifdef SMALL_SCREEN_DEVICE new GUI::ButtonWidget(this, "ScummConfig.Keys", "Keys", kKeysCmd, 'K'); #endif - -#ifdef SMALL_SCREEN_DEVICE - // - // Create the sub dialog(s) - // - - _keysDialog = new GUI::KeysDialog(); -#endif } ConfigDialog::~ConfigDialog() { @@ -611,7 +603,13 @@ void ConfigDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) switch (cmd) { case kKeysCmd: #ifdef SMALL_SCREEN_DEVICE + // + // Create the sub dialog(s) + // + _keysDialog = new GUI::KeysDialog(); _keysDialog->runModal(); + delete _keysDialog; + _keysDialog = NULL; #endif break; default: -- cgit v1.2.3