Tap gesture fix

This commit is contained in:
TrueZhuanjia committed 2025-09-10 12:39:26 +08:00
1 parent 4e65abf6b1
commit 45acc28384
2 files changed
+31 -16

No files matched your search

+1 -4
View File
@@ -30,9 +30,7 @@ import UIKit
case button
case touchPad
}
@objc static public var tapGestureShallBeCancelled: Bool = false
@objc public var widgetType: WidgetTypeEnum = WidgetTypeEnum.uninitialized
@objc static public var editMode: Bool = false
@@ -1190,7 +1188,6 @@ import UIKit
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
self.touchBegan = true
self.firstTouchMoved = false
OnScreenWidgetView.tapGestureShallBeCancelled = true
super.touchesBegan(touches, with: event)
// self.isMultipleTouchEnabled = self.touchPadString == "MOUSEPAD" // only enable multi-touch in mousePad mode
self.isMultipleTouchEnabled = self.widgetType == WidgetTypeEnum.button