1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-18 03:04:48 +00:00

camera movement in mobile/orientation/DRAG

This commit is contained in:
Zeno Rogue 2019-06-28 09:59:26 +02:00
parent 9edb1de098
commit 77f7b42856
2 changed files with 8 additions and 4 deletions

View File

@ -7551,7 +7551,7 @@ void gamescreen(int _darken) {
} }
else { 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" : "MOVE"), andmode == 0 ? BTON : BTOFF);
displayabutton(+1, +1, rug::rugged ? "RUG" : XLAT(andmode == 1 ? "BACK" : "DRAG"), andmode == 1 ? 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); displayabutton(-1, -1, XLAT("INFO"), andmode == 12 ? BTON : BTOFF);
displayabutton(+1, -1, XLAT("MENU"), andmode == 3 ? BTON : BTOFF); displayabutton(+1, -1, XLAT("MENU"), andmode == 3 ? BTON : BTOFF);

View File

@ -387,14 +387,18 @@ void mobile_draw(MOBPAR_FORMAL) {
displayTexts(); displayTexts();
#endif #endif
static int lticks_rug;
if(clicked && lclicked && andmode == 1 && normal_reaction) { if(clicked && lclicked && andmode == 1 && normal_reaction) {
if(!mouseout2() && mouseoh[2] < 50 && mouseh[2] < 50 && !rug::rugged) { if(DIM == 3 && !rug::rugged) {
View = cpush(2, -(ticks - lticks_rug) / 2500.) * View;
playermoved = false;
}
else if(!mouseout2() && mouseoh[2] < 50 && mouseh[2] < 50 && !rug::rugged) {
panning(mouseoh, mouseh); panning(mouseoh, mouseh);
} }
} }
static int lticks_rug;
#if CAP_RUG #if CAP_RUG
if(andmode == 1 && normal_reaction && rug::rugged && clicked) if(andmode == 1 && normal_reaction && rug::rugged && clicked)
rug::move_forward((ticks - lticks_rug) / 2500.); rug::move_forward((ticks - lticks_rug) / 2500.);