void MainMenu::onKeyDown(KeyboardEvent* event) { switch (event->keyCode()) { case SDLK_e: case SDLK_ESCAPE: doExit(); break; case SDLK_n: doNewGame(); break; case SDLK_l: doLoadGame(); break; case SDLK_i: doIntro(); break; case SDLK_c: doCredits(); break; case SDLK_o: doSettings(); break; } }
bool SaveLoad::loadGame() { Common::String null; int _di = selectSaveFile(null, false, "Load file", "Load"); if (_di == -1) { return false; } doLoadGame(_di); GUI::TimedMessageDialog dialog("Loading game...", 1500); dialog.runModal(); return true; }
void GameMenu::onKeyDown(Event::Keyboard* event) { switch (event->keyCode()) { case SDLK_ESCAPE: case SDLK_d: closeMenu(); break; case SDLK_s: doSaveGame(); break; case SDLK_l: doLoadGame(); break; case SDLK_p: doPreferences(); break; case SDLK_e: doExit(); break; } }
void MainMenu::onLoadGameButtonClick(MouseEvent* event) { doLoadGame(); }