mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
handlePanning handled keys even if smooth_scrolling was on
This commit is contained in:
parent
bbdebb14ef
commit
52bd8f12f6
25
control.cpp
25
control.cpp
@ -388,18 +388,21 @@ EX void handlePanning(int sym, int uni) {
|
|||||||
rug::using_rugview urv;
|
rug::using_rugview urv;
|
||||||
|
|
||||||
#if !ISPANDORA
|
#if !ISPANDORA
|
||||||
if(sym == SDLK_END) full_forward_camera(-0.2*shiftmul);
|
if(!smooth_scrolling) {
|
||||||
if(sym == SDLK_HOME) full_forward_camera(0.2*shiftmul);
|
if(sym == SDLK_END) full_forward_camera(-0.2*shiftmul);
|
||||||
if(sym == SDLK_RIGHT) full_rotate_camera(0, -0.2*shiftmul);
|
if(sym == SDLK_HOME) full_forward_camera(0.2*shiftmul);
|
||||||
if(sym == SDLK_LEFT) full_rotate_camera(0, 0.2*shiftmul);
|
if(sym == SDLK_RIGHT) full_rotate_camera(0, -0.2*shiftmul);
|
||||||
if(sym == SDLK_UP) full_rotate_camera(1, 0.2*shiftmul);
|
if(sym == SDLK_LEFT) full_rotate_camera(0, 0.2*shiftmul);
|
||||||
if(sym == SDLK_DOWN) full_rotate_camera(1, -0.2*shiftmul);
|
if(sym == SDLK_UP) full_rotate_camera(1, 0.2*shiftmul);
|
||||||
|
if(sym == SDLK_DOWN) full_rotate_camera(1, -0.2*shiftmul);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if(sym == SDLK_PAGEUP) full_rotate_view(1, M_PI/cgi.S21/2*shiftmul);
|
if(!smooth_scrolling) {
|
||||||
if(sym == SDLK_PAGEDOWN) full_rotate_view(-1, -M_PI/cgi.S21/2*shiftmul);
|
if(sym == SDLK_PAGEUP) full_rotate_view(1, M_PI/cgi.S21/2*shiftmul);
|
||||||
|
if(sym == SDLK_PAGEDOWN) full_rotate_view(-1, -M_PI/cgi.S21/2*shiftmul);
|
||||||
if(sym == SDLK_PAGEUP || sym == SDLK_PAGEDOWN)
|
if(sym == SDLK_PAGEUP || sym == SDLK_PAGEDOWN)
|
||||||
if(isGravityLand(cwt.at->land) && !rug::rug_control()) playermoved = false;
|
if(isGravityLand(cwt.at->land) && !rug::rug_control()) playermoved = false;
|
||||||
|
}
|
||||||
|
|
||||||
if(sym == PSEUDOKEY_WHEELUP && GDIM == 2) {
|
if(sym == PSEUDOKEY_WHEELUP && GDIM == 2) {
|
||||||
ld jx = (mousex - current_display->xcenter - .0) / current_display->radius / 10;
|
ld jx = (mousex - current_display->xcenter - .0) / current_display->radius / 10;
|
||||||
|
Loading…
Reference in New Issue
Block a user