1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-06-05 16:04:07 +00:00

tour:: next_slide function

This commit is contained in:
Zeno Rogue 2022-02-26 13:33:11 +01:00
parent 3410a20275
commit 48260b781e

View File

@ -206,12 +206,8 @@ void return_geometry() {
addMessage(XLAT("Returned to your game.")); addMessage(XLAT("Returned to your game."));
} }
bool handleKeyTour(int sym, int uni) { EX bool next_slide() {
if(!tour::on) return false;
if(!(cmode & sm::DOTOUR)) return false;
bool inhelp = cmode & sm::HELP;
flagtype flags = slides[currentslide].flags; flagtype flags = slides[currentslide].flags;
if((sym == SDLK_RETURN || sym == SDLK_KP_ENTER) && (!inhelp || (flags & QUICKSKIP))) {
popScreenAll(); popScreenAll();
if(gamestack::pushed()) { if(gamestack::pushed()) {
return_geometry(); return_geometry();
@ -225,6 +221,14 @@ bool handleKeyTour(int sym, int uni) {
slidehelp(); slidehelp();
return true; return true;
} }
bool handleKeyTour(int sym, int uni) {
if(!tour::on) return false;
if(!(cmode & sm::DOTOUR)) return false;
bool inhelp = cmode & sm::HELP;
flagtype flags = slides[currentslide].flags;
if((sym == SDLK_RETURN || sym == SDLK_KP_ENTER) && (!inhelp || (flags & QUICKSKIP)))
return next_slide();
if(sym == SDLK_BACKSPACE) { if(sym == SDLK_BACKSPACE) {
if(gamestack::pushed()) { if(gamestack::pushed()) {
gamestack::pop(); gamestack::pop();