autoDock & toolbox gesture fixes
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key>
|
||||
<false/>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -132,6 +132,9 @@ import UIKit
|
||||
@objc public static let functionalButtonCmds: [String] = [
|
||||
"SETTINGS",
|
||||
"TOOLBOX",
|
||||
"DISCONNECT",
|
||||
"QUITAPP",
|
||||
"PIP",
|
||||
"WIDGETTOOL",
|
||||
"ABSGAMEPAD",
|
||||
"WIDGETPROFILES",
|
||||
|
||||
@@ -18,6 +18,7 @@ import ObjectiveC.runtime
|
||||
|
||||
@objc public static var mapping: [Int16:OnScreenWidgetView] = [:]
|
||||
@objc public static var isRestoring: Bool = false
|
||||
@objc public static var hasRestoredFromAutoDock: Bool = false
|
||||
@objc public static func set(widget:OnScreenWidgetView, for key:Int16) {
|
||||
mapping[key] = widget
|
||||
}
|
||||
@@ -3017,6 +3018,11 @@ import ObjectiveC.runtime
|
||||
@objc private func vl_autoDock_touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
|
||||
OnScreenWidgetView.autoDockOriginalTouchesEndedIMP?(self, #selector(OnScreenWidgetView.touchesEnded(_:with:)), touches, event)
|
||||
guard autoDockEnabled else { return }
|
||||
if OnScreenWidgetView.hasRestoredFromAutoDock {
|
||||
DispatchQueue.global().asyncAfter(deadline: .now() + 0.02){
|
||||
OnScreenWidgetView.hasRestoredFromAutoDock = false
|
||||
}
|
||||
}
|
||||
autoDockRestartCountdownIfNeeded()
|
||||
}
|
||||
|
||||
@@ -3194,6 +3200,7 @@ import ObjectiveC.runtime
|
||||
|
||||
private func autoDockRestoreWidget(animated: Bool) {
|
||||
guard autoDockIsDocked, let restoreCenter = autoDockStoredCenter else { return }
|
||||
OnScreenWidgetView.hasRestoredFromAutoDock = true
|
||||
autoDockStopCountdown()
|
||||
autoDockStopSettledAlphaTimer()
|
||||
autoDockRestoreOriginalSize()
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#import "CustomEdgeSlideGestureRecognizer.h"
|
||||
#import <UIKit/UIGestureRecognizerSubclass.h>
|
||||
#import "VoidLink-Swift.h"
|
||||
|
||||
@implementation CustomEdgeSlideGestureRecognizer
|
||||
UITouch* capturedUITouch;
|
||||
@@ -52,6 +53,7 @@ CGFloat startPointX;
|
||||
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
||||
// [super touchesEnded:touches withEvent:event];
|
||||
if(_excludePencilEvent && touches.anyObject.type != UITouchTypeDirect) return;
|
||||
if(OnScreenWidgetView.hasRestoredFromAutoDock) return;
|
||||
if([touches containsObject:capturedUITouch]){
|
||||
CGFloat _endPointX = [capturedUITouch locationInView:self.view].x;
|
||||
CGFloat screenWidthInPoints = self.view.frame.size.width;
|
||||
|
||||
@@ -900,7 +900,7 @@ BOOL isCustomResolution(int resolutionSelected) {
|
||||
|
||||
[self addSetting:self.softKeyboardGestureStack ofId:@"softKeyboardGestureStack" withInfoTag:YES withDynamicLabel:NO to:gesturesSection];
|
||||
[self addSetting:self.slideToSettingsScreenEdgeStack ofId:@"slideToSettingsScreenEdgeStack" withInfoTag:NO withDynamicLabel:NO to:gesturesSection];
|
||||
// [self addSetting:self.slideToToolboxScreenEdgeStack ofId:@"slideToToolboxScreenEdgeStack" withInfoTag:NO withDynamicLabel:NO to:gesturesSection];
|
||||
[self addSetting:self.slideToToolboxScreenEdgeStack ofId:@"slideToToolboxScreenEdgeStack" withInfoTag:NO withDynamicLabel:NO to:gesturesSection];
|
||||
[self addSetting:self.slideToSettingsDistanceStack ofId:@"slideToSettingsDistanceStack" withInfoTag:YES withDynamicLabel:YES to:gesturesSection];
|
||||
[self addSetting:self.edgeSlidingSensitivityStack ofId:@"edgeSlidingSensitivityStack" withInfoTag:YES withDynamicLabel:YES to:gesturesSection];
|
||||
[gesturesSection addToParentStack:_parentStack];
|
||||
|
||||
@@ -298,7 +298,7 @@
|
||||
_slideToToolboxRecognizer.normalizedThresholdDistance = _settings.slideToSettingsDistance.floatValue;
|
||||
_slideToToolboxRecognizer.delaysTouchesBegan = NO;
|
||||
_slideToToolboxRecognizer.delaysTouchesEnded = NO;
|
||||
// [self.view addGestureRecognizer:_slideToToolboxRecognizer];
|
||||
[self.view addGestureRecognizer:_slideToToolboxRecognizer];
|
||||
|
||||
if([self isOscLayoutToolEnabled]){
|
||||
_oscLayoutTapRecoginizer = [[CustomTapGestureRecognizer alloc] initWithTarget:self action:@selector(handleWidgetLayoutGesture)];
|
||||
|
||||
Reference in New Issue
Block a user