diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tsage/dialogs.cpp | 10 | ||||
-rw-r--r-- | engines/tsage/dialogs.h | 7 | ||||
-rw-r--r-- | engines/tsage/ringworld/ringworld_logic.cpp | 9 |
3 files changed, 19 insertions, 7 deletions
diff --git a/engines/tsage/dialogs.cpp b/engines/tsage/dialogs.cpp index d5e7b1514d..841a7b776d 100644 --- a/engines/tsage/dialogs.cpp +++ b/engines/tsage/dialogs.cpp @@ -367,6 +367,7 @@ void OptionsDialog::show() { _globals->_game->restartGame(); } else if (btn == &dlg->_btnSound) { // Sound dialog + SoundDialog::execute(); } else if (btn == &dlg->_btnSave) { // Save button _globals->_game->saveGame(); @@ -414,5 +415,14 @@ OptionsDialog::OptionsDialog() { setCenter(160, 100); } +/*--------------------------------------------------------------------------*/ + +void SoundDialog::execute() { + ConfigDialog *dlg = new ConfigDialog(); + dlg->runModal(); + delete dlg; + _globals->_soundManager.syncSounds(); + _globals->_events.setCursorFromFlag(); +} } // End of namespace TsAGE diff --git a/engines/tsage/dialogs.h b/engines/tsage/dialogs.h index 7355ea1cf9..35ed60ba1a 100644 --- a/engines/tsage/dialogs.h +++ b/engines/tsage/dialogs.h @@ -99,6 +99,13 @@ public: static void show(); }; +/*--------------------------------------------------------------------------*/ + +class SoundDialog { +public: + static void execute(); +}; + } // End of namespace TsAGE #endif diff --git a/engines/tsage/ringworld/ringworld_logic.cpp b/engines/tsage/ringworld/ringworld_logic.cpp index 366076d7aa..72c56973d9 100644 --- a/engines/tsage/ringworld/ringworld_logic.cpp +++ b/engines/tsage/ringworld/ringworld_logic.cpp @@ -1449,15 +1449,10 @@ void RingworldGame::processEvent(Event &event) { MessageDialog::show(HELP_MSG, OK_BTN_STRING); break; - case Common::KEYCODE_F2: { + case Common::KEYCODE_F2: // F2 - Sound Options - ConfigDialog *dlg = new ConfigDialog(); - dlg->runModal(); - delete dlg; - _globals->_soundManager.syncSounds(); - _globals->_events.setCursorFromFlag(); + SoundDialog::execute(); break; - } case Common::KEYCODE_F3: // F3 - Quit |