mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
fixed movement in mobile 3D, also WAIT if held for 250-500 ms in full 3D geometry
This commit is contained in:
parent
0d65b73227
commit
de06aede33
@ -7550,7 +7550,7 @@ void gamescreen(int _darken) {
|
||||
drawCircle(xfire, yb, rad/2, 0xFF0000FF);
|
||||
}
|
||||
else {
|
||||
if(!haveMobileCompass()) displayabutton(-1, +1, XLAT(andmode == 0 && useRangedOrb ? "FIRE" : "MOVE"), andmode == 0 ? BTON : BTOFF);
|
||||
if(!haveMobileCompass()) displayabutton(-1, +1, XLAT(andmode == 0 && useRangedOrb ? "FIRE" : andmode == 0 && WDIM == 3 && wclick ? "WAIT" : "MOVE"), andmode == 0 ? BTON : BTOFF);
|
||||
displayabutton(+1, +1, rug::rugged ? "RUG" : XLAT(andmode == 1 ? "BACK" : DIM == 3 ? "CAM" : "DRAG"), andmode == 1 ? BTON : BTOFF);
|
||||
}
|
||||
displayabutton(-1, -1, XLAT("INFO"), andmode == 12 ? BTON : BTOFF);
|
||||
|
8
init.cpp
8
init.cpp
@ -109,6 +109,7 @@ bool lclicked = false, clicked = false;
|
||||
string lmouseovers;
|
||||
bool inmenu = false;
|
||||
|
||||
bool wclick;
|
||||
bool longclick;
|
||||
bool verylongclick;
|
||||
|
||||
@ -194,7 +195,11 @@ void handleclick(MOBPAR_FORMAL) {
|
||||
if(mouseover && targetclick && targetRangedOrb(mouseover, forcetarget ? roMouseForce : roMouse)) {
|
||||
;
|
||||
}
|
||||
else if(!forcetarget) movepcto(mousedest);
|
||||
else if(!forcetarget) {
|
||||
if(WDIM == 3 && wclick) movepcto(-1);
|
||||
else if(DIM == 3) mousemovement();
|
||||
else movepcto(mousedest);
|
||||
}
|
||||
}
|
||||
|
||||
if(andmode == 10) {
|
||||
@ -274,6 +279,7 @@ void mobile_draw(MOBPAR_FORMAL) {
|
||||
mouseoh = mouseh;
|
||||
gtouched = mousepressed = clicked;
|
||||
|
||||
wclick = lclicked && ticks > touchedAt + 250;
|
||||
longclick = lclicked && ticks > touchedAt + 500;
|
||||
verylongclick = longclick && ticks > touchedAt + 1000;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user