mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-05-19 07:34:08 +00:00
dual:: panning split only if cannot select with mouse
This commit is contained in:
parent
69e76b550c
commit
f509dd0db0
10
control.cpp
10
control.cpp
@ -29,6 +29,10 @@ bool mousepressed = false;
|
|||||||
bool mousemoved = false;
|
bool mousemoved = false;
|
||||||
bool actonrelease = false;
|
bool actonrelease = false;
|
||||||
|
|
||||||
|
bool mousepan, oldmousepan;
|
||||||
|
ld mouseaim_x, mouseaim_y;
|
||||||
|
ld mouseaim_sensitivity = 0.01;
|
||||||
|
|
||||||
int timetowait;
|
int timetowait;
|
||||||
|
|
||||||
#if CAP_SDLJOY
|
#if CAP_SDLJOY
|
||||||
@ -247,7 +251,7 @@ typedef SDL_Event eventtype;
|
|||||||
bool smooth_scrolling = false;
|
bool smooth_scrolling = false;
|
||||||
|
|
||||||
void handlePanning(int sym, int uni) {
|
void handlePanning(int sym, int uni) {
|
||||||
if(dual::split([=] { handlePanning(sym, uni); })) return;
|
if(mousepan && dual::split([=] { handlePanning(sym, uni); })) return;
|
||||||
if(DIM == 3) {
|
if(DIM == 3) {
|
||||||
if(sym == PSEUDOKEY_WHEELUP) View = cpush(2, -0.05*shiftmul) * View, didsomething = true, playermoved = false;
|
if(sym == PSEUDOKEY_WHEELUP) View = cpush(2, -0.05*shiftmul) * View, didsomething = true, playermoved = false;
|
||||||
if(sym == PSEUDOKEY_WHEELDOWN) View = cpush(2, 0.05*shiftmul) * View, didsomething = true, playermoved = false;
|
if(sym == PSEUDOKEY_WHEELDOWN) View = cpush(2, 0.05*shiftmul) * View, didsomething = true, playermoved = false;
|
||||||
@ -511,10 +515,6 @@ void resize_screen_to(int x, int y) {
|
|||||||
setvideomode();
|
setvideomode();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mousepan, oldmousepan;
|
|
||||||
ld mouseaim_x, mouseaim_y;
|
|
||||||
ld mouseaim_sensitivity = 0.01;
|
|
||||||
|
|
||||||
void mainloopiter() {
|
void mainloopiter() {
|
||||||
|
|
||||||
DEBB(DF_GRAPH, ("main loop\n"));
|
DEBB(DF_GRAPH, ("main loop\n"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user