mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-11-26 00:07:10 +00:00
more intuitive auto-drag
This commit is contained in:
1 parent
5b1c2e7acd
commit
e7e95e8d67
2 files changed
+17
-8
No files matched your search
@@ -2501,16 +2501,12 @@ EX void resetview() {
|
||||
// SDL_UnlockSurface(s);
|
||||
}
|
||||
|
||||
|
||||
EX void panning(shiftpoint hf0, shiftpoint ht0) {
|
||||
hyperpoint hf = hf0.h;
|
||||
hyperpoint ht = unshift(ht0, hf0.shift);
|
||||
ld d = hdist(hf, ht);
|
||||
if(drag_sensitivity && d < 1/drag_sensitivity && drag_distance == 0) return;
|
||||
View =
|
||||
rgpushxto0(hf) * rgpushxto0(gpushxto0(hf) * ht) * gpushxto0(hf) * View;
|
||||
playermoved = false; currently_scrolling = true;
|
||||
drag_distance += d;
|
||||
}
|
||||
|
||||
EX int cells_drawn, cells_generated;
|
||||
|
||||
Reference in new issue
Block a user