1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-02-28 17:00:19 +00:00

fixed incorrect scrolling when clicking the mousewheel from outside the Poincare disk

This commit is contained in:
Zeno Rogue 2025-02-24 00:11:18 +01:00
parent 925ec61fb6
commit 2775a120af
3 changed files with 2 additions and 3 deletions

View File

@ -163,7 +163,6 @@ EX void movevrdir(hyperpoint vec) {
}
EX void calcMousedest() {
if(mouseout()) return;
if(vid.revcontrol == true) { mouseh[0] = -mouseh[0]; mouseh[1] = -mouseh[1]; }
ld mousedist = hdist(mouseh, tC0(ggmatrix(cwt.at)));
mousedest.d = -1;
@ -219,6 +218,7 @@ EX void mousemovement() {
}
if(protect_memory()) return;
if(mouseout()) return;
calcMousedest();
if(!canmove) movepcto(mousedest), remission(); else movepcto(mousedest);

View File

@ -5575,7 +5575,6 @@ EX void drawthemap() {
bool useRangedOrb = (!(vid.shifttarget & 1) && haveRangedOrb() && lmouseover && lmouseover->cpdist > 1) || (keystate[SDL12(SDLK_RSHIFT, SDL_SCANCODE_RSHIFT)] | keystate[SDL12(SDLK_LSHIFT, SDL_SCANCODE_LSHIFT)]);
if(!useRangedOrb && !(cmode & sm::MAP) && !(cmode & sm::DRAW) && DEFAULTCONTROL && !mouseout() && !dual::state) {
dynamicval<eGravity> gs(gravity_state, gravity_state);
void calcMousedest();
calcMousedest();
cellwalker cw = cwt; bool f = flipplayer;
items[itWarning]+=2;

View File

@ -1150,7 +1150,7 @@ EX void handleInput(int delta, config &scfg) {
if(countplayers_undecided > 0 && ! isUndecided) continue;
if(playerpos(i) == c)
multi::whereto[i].d = MD_WAIT;
else {
else if(!mouseout()) {
for(int d=0; d<playerpos(i)->type; d++) {
cdir = d;
if(multi::multiPlayerTarget(i) == c) break;