1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-08-30 17:27:57 +00:00

tour mode now reacts to pageup/down

This commit is contained in:
Zeno Rogue
2025-08-17 03:09:19 +02:00
parent af0a546114
commit fff5ed37ab
2 changed files with 6 additions and 5 deletions

View File

@@ -517,7 +517,7 @@ EX void handlePanning(int sym, int uni) {
if(sym == SDLK_DOWN) full_rotate_camera(1, -0.2*shiftmul); if(sym == SDLK_DOWN) full_rotate_camera(1, -0.2*shiftmul);
} }
#endif #endif
if(!smooth_scrolling) { if(!smooth_scrolling && !tour::on) {
if(sym == SDLK_PAGEUP) full_rotate_view(1, cgi.S_step*shiftmul); if(sym == SDLK_PAGEUP) full_rotate_view(1, cgi.S_step*shiftmul);
if(sym == SDLK_PAGEDOWN) full_rotate_view(-1, -cgi.S_step*shiftmul); if(sym == SDLK_PAGEDOWN) full_rotate_view(-1, -cgi.S_step*shiftmul);
if(sym == SDLK_PAGEUP || sym == SDLK_PAGEDOWN) if(sym == SDLK_PAGEUP || sym == SDLK_PAGEDOWN)
@@ -1024,8 +1024,8 @@ EX void mainloopiter() {
if(keystate[SDLK_LEFT] && DEFAULTNOR(SDLK_LEFT)) full_rotate_camera(0, t); if(keystate[SDLK_LEFT] && DEFAULTNOR(SDLK_LEFT)) full_rotate_camera(0, t);
if(keystate[SDLK_UP] && DEFAULTNOR(SDLK_UP)) full_rotate_camera(1, t); if(keystate[SDLK_UP] && DEFAULTNOR(SDLK_UP)) full_rotate_camera(1, t);
if(keystate[SDLK_DOWN] && DEFAULTNOR(SDLK_DOWN)) full_rotate_camera(1, -t); if(keystate[SDLK_DOWN] && DEFAULTNOR(SDLK_DOWN)) full_rotate_camera(1, -t);
if(keystate[SDLK_PAGEUP] && DEFAULTNOR(SDLK_PAGEUP)) full_rotate_view(t / degree, t); if(keystate[SDLK_PAGEUP] && DEFAULTNOR(SDLK_PAGEUP) && !tour::on) full_rotate_view(t / degree, t);
if(keystate[SDLK_PAGEDOWN] && DEFAULTNOR(SDLK_PAGEDOWN)) full_rotate_view(-t / degree, -t); if(keystate[SDLK_PAGEDOWN] && DEFAULTNOR(SDLK_PAGEDOWN) && !tour::on) full_rotate_view(-t / degree, -t);
#endif #endif
} }
else sc_ticks = ticks; else sc_ticks = ticks;

View File

@@ -274,9 +274,10 @@ bool handleKeyTour(int sym, int uni) {
dialog::key_actions[sym](); dialog::key_actions[sym]();
return true; return true;
} }
if(sym == SDLK_PAGEDOWN) return next_slide();
if((sym == SDLK_RETURN || sym == SDLK_KP_ENTER) && (!inhelp || (flags & QUICKSKIP))) if((sym == SDLK_RETURN || sym == SDLK_KP_ENTER) && (!inhelp || (flags & QUICKSKIP)))
return next_slide(); return next_slide();
if(sym == SDLK_BACKSPACE) { if(sym == SDLK_BACKSPACE || sym == SDLK_PAGEUP) {
if(gamestack::pushed()) { if(gamestack::pushed()) {
gamestack::pop(); gamestack::pop();
if(!(flags & QUICKGEO)) return true; if(!(flags & QUICKGEO)) return true;
@@ -286,7 +287,7 @@ bool handleKeyTour(int sym, int uni) {
currentslide--; currentslide--;
presentation(pmStart); presentation(pmStart);
popScreenAll(); popScreenAll();
if(inhelp || (flags & ALWAYS_TEXT)) slidehelp(); if(sym != SDLK_PAGEUP) if(inhelp || (flags & ALWAYS_TEXT)) slidehelp();
return true; return true;
} }
int legal = slides[currentslide].flags & 7; int legal = slides[currentslide].flags & 7;