1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-02-03 12:49:17 +00:00

fixes to starting/stopping daily

This commit is contained in:
Zeno Rogue 2018-05-27 01:06:54 +02:00
parent 9fb73c79bb
commit b28c82b26b
2 changed files with 20 additions and 2 deletions

View File

@ -368,6 +368,10 @@ void handleKeyNormal(int sym, int uni) {
// if(sym == SDLK_F4) restartGameSwitchEuclid(); // if(sym == SDLK_F4) restartGameSwitchEuclid();
if(sym == SDLK_F5) { if(sym == SDLK_F5) {
#if CAP_DAILY
if(daily::on) daily::handleQuit(1);
else
#endif
if(needConfirmation()) if(needConfirmation())
pushScreen(showMission); pushScreen(showMission);
else restartGame(); else restartGame();
@ -381,6 +385,10 @@ void handleKeyNormal(int sym, int uni) {
} }
if(sym == SDLK_F10) { if(sym == SDLK_F10) {
#if CAP_DAILY
if(daily::on) daily::handleQuit(2);
else
#endif
if(needConfirmation()) pushScreen(showMission); if(needConfirmation()) pushScreen(showMission);
else quitmainloop = true; else quitmainloop = true;
} }
@ -786,6 +794,10 @@ void handle_event(SDL_Event& ev) {
} }
if(ev.type == SDL_QUIT) { if(ev.type == SDL_QUIT) {
#if CAP_DAILY
if(daily::on) daily::handleQuit(3);
else
#endif
if(needConfirmation() && !(cmode & sm::MISSION)) showMissionScreen(); if(needConfirmation() && !(cmode & sm::MISSION)) showMissionScreen();
else quitmainloop = true; else quitmainloop = true;
} }

View File

@ -678,7 +678,7 @@ void showStartMenu() {
case 20: case 20:
dialog::addBreak(100); dialog::addBreak(100);
dialog::addBigItem(XLAT1("Halloween"), 'z'); dialog::addBigItem(XLAT1("Halloween"), 'Z');
dialog::addInfo(XLAT("Halloween mini-game")); dialog::addInfo(XLAT("Halloween mini-game"));
break; break;
} }
@ -770,7 +770,7 @@ void showStartMenu() {
pushScreen(multi::showShmupConfig); pushScreen(multi::showShmupConfig);
} }
} }
else if(uni == 'z') { else if(uni == 'Z') {
popScreenAll(); popScreenAll();
resetModes('g'); resetModes('g');
stampbase = ticks; stampbase = ticks;
@ -789,6 +789,12 @@ void showStartMenu() {
tour::start(); tour::start();
} }
#endif #endif
#if CAP_DAILY
else if(uni == 'z') {
popScreenAll();
pushScreen(daily::showMenu);
}
#endif
#if CAP_ROGUEVIZ && CAP_TOUR #if CAP_ROGUEVIZ && CAP_TOUR
else if(uni == 'r') { else if(uni == 'r') {
tour::slides = rogueviz::rvtour::rvslides; tour::slides = rogueviz::rvtour::rvslides;