mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-12-24 06:26:02 +00:00
fixed movement in mobile 3D, also WAIT if held for 250-500 ms in full 3D geometry
This commit is contained in:
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user