Fixed bug that was not correctly showing the full Commander decks list in the deck choosing menu page, added a new gesture for Android to emulate back button pressure: now sliding from down to up for almost all screen size will trigger the back button in game (e.g. pause match in gameplay, going back from shop, and so on).

This commit is contained in:
Vittorio Alfieri
2021-09-05 01:15:01 +02:00
parent c211b2eaa4
commit ccae9673e6
7 changed files with 19 additions and 14 deletions

View File

@@ -1822,7 +1822,9 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
y2 = event.getY();
float deltaY = y2 - y1;
if (deltaY > DELTA_Y)
parent.showOptionMenu();
parent.showOptionMenu(); // Emulate Android option menu button pressure.
else if (deltaY < -DELTA_Y)
SDLActivity.onNativeKeyDown(KeyEvent.KEYCODE_BACK ); // Emulate Android back button pressure.
break;
}