|
|
@ -267,14 +267,19 @@ public class AndroidInput implements |
|
|
|
lastPos = new Vector2f(event.getX(p), view.getHeight() - event.getY(p)); |
|
|
|
lastPos = new Vector2f(event.getX(p), view.getHeight() - event.getY(p)); |
|
|
|
lastPositions.put(event.getPointerId(p), lastPos); |
|
|
|
lastPositions.put(event.getPointerId(p), lastPos); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float dX = event.getX(p) - lastPos.x; |
|
|
|
|
|
|
|
float dY = view.getHeight() - event.getY(p) - lastPos.y; |
|
|
|
|
|
|
|
if (dX != 0 || dY != 0) { |
|
|
|
touch = getNextFreeTouchEvent(); |
|
|
|
touch = getNextFreeTouchEvent(); |
|
|
|
touch.set(Type.MOVE, event.getX(p), view.getHeight() - event.getY(p), event.getX(p) - lastPos.x, view.getHeight() - event.getY(p) - lastPos.y); |
|
|
|
touch.set(Type.MOVE, event.getX(p), view.getHeight() - event.getY(p), dX, dY); |
|
|
|
touch.setPointerId(event.getPointerId(p)); |
|
|
|
touch.setPointerId(event.getPointerId(p)); |
|
|
|
touch.setTime(event.getEventTime()); |
|
|
|
touch.setTime(event.getEventTime()); |
|
|
|
touch.setPressure(event.getPressure(p)); |
|
|
|
touch.setPressure(event.getPressure(p)); |
|
|
|
processEvent(touch); |
|
|
|
processEvent(touch); |
|
|
|
lastPos.set(event.getX(p), view.getHeight() - event.getY(p)); |
|
|
|
lastPos.set(event.getX(p), view.getHeight() - event.getY(p)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
bWasHandled = true; |
|
|
|
bWasHandled = true; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case MotionEvent.ACTION_OUTSIDE: |
|
|
|
case MotionEvent.ACTION_OUTSIDE: |
|
|
|