From a906b97be398ddea1555c10c33f68ab72c24e3c1 Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Sat, 7 Jan 2012 23:29:51 +0000 Subject: [PATCH] AndroidInput now correctly dispatches DOUBLETAP event git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8994 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../src/android/com/jme3/input/android/AndroidInput.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/engine/src/android/com/jme3/input/android/AndroidInput.java b/engine/src/android/com/jme3/input/android/AndroidInput.java index cd3d5f576..b78b306a7 100644 --- a/engine/src/android/com/jme3/input/android/AndroidInput.java +++ b/engine/src/android/com/jme3/input/android/AndroidInput.java @@ -25,7 +25,7 @@ import java.util.logging.Logger; * */ public class AndroidInput extends GLSurfaceView implements TouchInput, - GestureDetector.OnGestureListener, ScaleGestureDetector.OnScaleGestureListener { + GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener, ScaleGestureDetector.OnScaleGestureListener { final private static int MAX_EVENTS = 1024; // Custom settings @@ -220,7 +220,7 @@ public class AndroidInput extends GLSurfaceView implements TouchInput, boolean bWasHandled = false; TouchEvent touch; - // Try to detect gestures + // Try to detect gestures this.detector.onTouchEvent(event); this.scaledetector.onTouchEvent(event); @@ -570,6 +570,10 @@ public class AndroidInput extends GLSurfaceView implements TouchInput, return true; } + public boolean onDoubleTapEvent(MotionEvent event) { + return false; + } + public boolean onScaleBegin(ScaleGestureDetector scaleGestureDetector) { TouchEvent touch = getNextFreeTouchEvent(); touch.set(Type.SCALE_START, scaleGestureDetector.getFocusX(), scaleGestureDetector.getFocusY(), 0f, 0f);