mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 09:50:34 +00:00
you can now use shift/ctrl+mousewheel to control zoom and projection
This commit is contained in:
parent
496060d0b4
commit
2c7003a0ea
23
control.cpp
23
control.cpp
@ -618,6 +618,9 @@ void mainloopiter() {
|
||||
actonrelease = ev.type == SDL_MOUSEBUTTONDOWN;
|
||||
}
|
||||
|
||||
bool anyctrl = keystate[SDLK_LCTRL] || keystate[SDLK_RCTRL];
|
||||
bool anyshift = keystate[SDLK_LSHIFT] || keystate[SDLK_RSHIFT];
|
||||
|
||||
if(!act) ;
|
||||
|
||||
else if(ev.button.button==SDL_BUTTON_RIGHT || leftclick)
|
||||
@ -629,7 +632,15 @@ void mainloopiter() {
|
||||
}
|
||||
|
||||
else if(ev.button.button==SDL_BUTTON_WHEELDOWN) {
|
||||
if(rollchange) {
|
||||
if(anyctrl && anyshift) {
|
||||
vid.scale /= 1.2;
|
||||
vid.alpha /= 1.2;
|
||||
}
|
||||
else if(anyctrl)
|
||||
vid.scale *= pow(2, -.25);
|
||||
else if(anyshift)
|
||||
vid.alpha -= 0.25;
|
||||
else if(rollchange) {
|
||||
sym = getcstat, uni = getcstat, shiftmul = getcshift, wheelclick = true;
|
||||
}
|
||||
else {
|
||||
@ -637,7 +648,15 @@ void mainloopiter() {
|
||||
}
|
||||
}
|
||||
if(ev.button.button==SDL_BUTTON_WHEELUP) {
|
||||
if(rollchange) {
|
||||
if(anyctrl && anyshift) {
|
||||
vid.scale *= 1.2;
|
||||
vid.alpha *= 1.2;
|
||||
}
|
||||
else if(anyctrl)
|
||||
vid.scale *= pow(2, .25);
|
||||
else if(anyshift)
|
||||
vid.alpha += 0.25;
|
||||
else if(rollchange) {
|
||||
sym = getcstat, uni = getcstat, shiftmul = -getcshift, wheelclick = true;
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user