Ported form godot: Fix spatial viewport multitouch detection support

Regression introduced by #77497
- m4gr3d
8f44765831
This commit is contained in:
Relintai 2023-06-28 12:50:27 +02:00
parent ee54ca3808
commit e79ea9f3a8

View File

@ -231,7 +231,7 @@ internal class PandemoniumGestureHandler : SimpleOnGestureListener(), OnScaleGes
val x = terminusEvent.x
val y = terminusEvent.y
if (terminusEvent.pointerCount >= 2 && panningAndScalingEnabled && !pointerCaptureInProgress) {
if (terminusEvent.pointerCount >= 2 && panningAndScalingEnabled && !pointerCaptureInProgress && !dragInProgress) {
PandemoniumLib.pan(x, y, distanceX / 5f, distanceY / 5f)
} else if (!scaleInProgress) {
PandemoniumInputHandler.handleMotionEvent(terminusEvent)
@ -241,7 +241,7 @@ internal class PandemoniumGestureHandler : SimpleOnGestureListener(), OnScaleGes
}
override fun onScale(detector: ScaleGestureDetector): Boolean {
if (!panningAndScalingEnabled || pointerCaptureInProgress) {
if (!panningAndScalingEnabled || pointerCaptureInProgress || dragInProgress) {
return false
}
@ -256,7 +256,7 @@ internal class PandemoniumGestureHandler : SimpleOnGestureListener(), OnScaleGes
}
override fun onScaleBegin(detector: ScaleGestureDetector): Boolean {
if (!panningAndScalingEnabled || pointerCaptureInProgress) {
if (!panningAndScalingEnabled || pointerCaptureInProgress || dragInProgress) {
return false
}
scaleInProgress = true