void GameScene::on_menuGameStart() { menu->activate(false); gameProfile->setGameStarted(true); gameProfile->setGamePaused(false); gameProfile->currentPlayer()->currentLevelPackInfo()->init(); if (!initLevel(1)) exitToMainMenu(); }
void GameScene::on_menuAbandonGame() { menu->hide(); if (dconfirm->exec(tr("Current level progress will be lost.\nAre you sure you want to quit?"))) { // go to main menu exitToMainMenu(); } menu->showNormal(); }
void GameScene::on_menuContinue() { if (gameProfile->currentPlayer()->currentLevelPackInfo()->level > max_level) return; menu->activate(false); gameProfile->setGameStarted(true); gameProfile->setGamePaused(false); if (!initLevel(gameProfile->currentPlayer()->currentLevelPackInfo()->level)) exitToMainMenu(); }
void GameScene::on_menuRestartLevel() { menu->hide(); if (dconfirm->exec(tr("Current level progress will be lost.\nAre you sure you want to restart?"))) { if (!initLevel(gameProfile->currentPlayer()->currentLevelPackInfo()->level)) exitToMainMenu(); on_menuPauseBack(); return; } menu->showNormal(); }
void InterfaceLogic::exitToMainConfirmationUpdate() { switch (exitToMainConfirmationMenu.update()) { case MenuLogic::resBack: goPreviousState(); break; case MenuLogic::resExitToMain: exitToMainMenu(); break; case resNone: break; default: assert(0); break; } }