Added/fixed primitives, updated the "missing_cards_by_sets" folder, added new ability "hasstrive" to implement Strive cost with multikicker and refactored all cards with Strive cost (now they use a special version of multikicker but they don't count as kicked spell), improved "targeted" and "vampired" trigger to allow the "turnlimited" option, improved Android gesture to emulate "option menu" button pressure (slide down) and emulate "back" button pressure (slide up).

This commit is contained in:
Vittorio Alfieri
2021-09-07 21:41:24 +02:00
parent 9dabf121d3
commit 9aa15766d4
21 changed files with 424 additions and 512 deletions

View File

@@ -1811,7 +1811,6 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
// Touch events
public boolean onTouch(View v, MotionEvent event) {
// Show Menu for devices without sidebar (e.g. Android 10)
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_POINTER_DOWN:
@@ -1821,10 +1820,13 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
case MotionEvent.ACTION_POINTER_UP:
y2 = event.getY();
float deltaY = y2 - y1;
if (deltaY > DELTA_Y)
parent.showOptionMenu(); // Emulate Android option menu button pressure.
else if (deltaY < -DELTA_Y)
SDLActivity.onNativeKeyDown(KeyEvent.KEYCODE_BACK ); // Emulate Android back button pressure.
if (deltaY > DELTA_Y) {
parent.showOptionMenu(); // Emulate Android "optionmenu" button pressure (for devices without sidebar, e.g. like Android 10).
return true;
} else if (deltaY < -DELTA_Y){
SDLActivity.onNativeKeyDown(KeyEvent.KEYCODE_BACK); // Emulate Android "back" button pressure (for devices without sidebar, e.g. like Android 10).
return true;
}
break;
}