void SoundDialog::execute() { ConfigDialog *dlg = new ConfigDialog(); dlg->runModal(); delete dlg; g_globals->_soundManager.syncSounds(); g_globals->_events.setCursorFromFlag(); }
void RingworldDemoGame::processEvent(Event &event) { if (event.eventType == EVENT_KEYPRESS) { switch (event.kbd.keycode) { case Common::KEYCODE_F1: // F1 - Help MessageDialog::show(DEMO_HELP_MSG, OK_BTN_STRING); break; case Common::KEYCODE_F2: { // F2 - Sound Options ConfigDialog *dlg = new ConfigDialog(); dlg->runModal(); delete dlg; g_globals->_soundManager.syncSounds(); g_globals->_events.setCursorFromFlag(); break; } case Common::KEYCODE_F3: // F3 - Quit quitGame(); event.handled = false; break; default: break; } } else if (event.eventType == EVENT_BUTTON_DOWN) { pauseGame(); event.handled = true; } }
void RingworldGame::processEvent(Event &event) { if (event.eventType == EVENT_KEYPRESS) { switch (event.kbd.keycode) { case Common::KEYCODE_F1: // F1 - Help MessageDialog::show(HELP_MSG, OK_BTN_STRING); break; case Common::KEYCODE_F2: { // F2 - Sound Options ConfigDialog *dlg = new ConfigDialog(); dlg->runModal(); delete dlg; _globals->_soundManager.syncSounds(); _globals->_events.setCursorFromFlag(); break; } case Common::KEYCODE_F3: // F3 - Quit quitGame(); event.handled = false; break; case Common::KEYCODE_F4: // F4 - Restart restartGame(); _globals->_events.setCursorFromFlag(); break; case Common::KEYCODE_F7: // F7 - Restore restoreGame(); _globals->_events.setCursorFromFlag(); break; case Common::KEYCODE_F10: // F10 - Pause GfxDialog::setPalette(); MessageDialog::show(GAME_PAUSED_MSG, OK_BTN_STRING); _globals->_events.setCursorFromFlag(); break; default: break; } } }