MCPcopy Create free account
hub / github.com/Card-Forge/forge / fling

Method fling

forge-gui-mobile/src/forge/card/CardZoom.java:249–271  ·  view source on GitHub ↗
(float velocityX, float velocityY)

Source from the content-addressed store, hash-verified

247 }
248
249 @Override
250 public boolean fling(float velocityX, float velocityY) {
251 if (Math.abs(velocityX) > Math.abs(velocityY)) {
252 incrementCard(velocityX > 0 ? -1 : 1);
253 showBackSide = false;
254 showAltState = false;
255 return true;
256 }
257 if (velocityY > 0) {
258 zoomMode = !zoomMode;
259 showBackSide = false;
260 showAltState = false;
261 return true;
262 }
263 if (currentActivateAction != null && activateHandler != null) {
264 hide();
265 showBackSide = false;
266 showAltState = false;
267 activateHandler.activate(currentIndex);
268 return true;
269 }
270 return false;
271 }
272
273 private void setOneCardView(boolean oneCardView0) {
274 if (oneCardView == oneCardView0 || Forge.isLandscapeMode()) {

Callers 1

keyDownMethod · 0.95

Calls 3

incrementCardMethod · 0.95
hideMethod · 0.65
activateMethod · 0.65

Tested by

no test coverage detected