mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-04-06 12:01:48 +02:00
Ported form godot: Fix spatial viewport multitouch detection support
Regression introduced by #77497
- m4gr3d
8f44765831
This commit is contained in:
parent
ee54ca3808
commit
e79ea9f3a8
@ -231,7 +231,7 @@ internal class PandemoniumGestureHandler : SimpleOnGestureListener(), OnScaleGes
|
|||||||
|
|
||||||
val x = terminusEvent.x
|
val x = terminusEvent.x
|
||||||
val y = terminusEvent.y
|
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)
|
PandemoniumLib.pan(x, y, distanceX / 5f, distanceY / 5f)
|
||||||
} else if (!scaleInProgress) {
|
} else if (!scaleInProgress) {
|
||||||
PandemoniumInputHandler.handleMotionEvent(terminusEvent)
|
PandemoniumInputHandler.handleMotionEvent(terminusEvent)
|
||||||
@ -241,7 +241,7 @@ internal class PandemoniumGestureHandler : SimpleOnGestureListener(), OnScaleGes
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onScale(detector: ScaleGestureDetector): Boolean {
|
override fun onScale(detector: ScaleGestureDetector): Boolean {
|
||||||
if (!panningAndScalingEnabled || pointerCaptureInProgress) {
|
if (!panningAndScalingEnabled || pointerCaptureInProgress || dragInProgress) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,7 +256,7 @@ internal class PandemoniumGestureHandler : SimpleOnGestureListener(), OnScaleGes
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onScaleBegin(detector: ScaleGestureDetector): Boolean {
|
override fun onScaleBegin(detector: ScaleGestureDetector): Boolean {
|
||||||
if (!panningAndScalingEnabled || pointerCaptureInProgress) {
|
if (!panningAndScalingEnabled || pointerCaptureInProgress || dragInProgress) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
scaleInProgress = true
|
scaleInProgress = true
|
||||||
|
Loading…
Reference in New Issue
Block a user