1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-08-29 16:57:56 +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);
}
#endif
if(!smooth_scrolling) {
if(!smooth_scrolling && !tour::on) {
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_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_UP] && DEFAULTNOR(SDLK_UP)) 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_PAGEDOWN] && DEFAULTNOR(SDLK_PAGEDOWN)) 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) && !tour::on) full_rotate_view(-t / degree, -t);
#endif
}
else sc_ticks = ticks;

View File

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