From 6b085982f1a38f474b84590aecbb807f67eb576f Mon Sep 17 00:00:00 2001 From: True Zhuanjia Date: Wed, 8 Apr 2026 02:25:57 +0800 Subject: [PATCH] cancel tap gesture for widget layout tool --- .../VoidLink v1.0.xcdatamodel/contents | 2 +- .../ViewControllers/MainFrameViewController.m | 1 + .../ViewControllers/SettingsViewController.m | 44 +++++++++++-------- 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/VoidLink/Limelight.xcdatamodeld/VoidLink v1.0.xcdatamodel/contents b/VoidLink/Limelight.xcdatamodeld/VoidLink v1.0.xcdatamodel/contents index 26bbcbb3..bbf489d6 100644 --- a/VoidLink/Limelight.xcdatamodeld/VoidLink v1.0.xcdatamodel/contents +++ b/VoidLink/Limelight.xcdatamodeld/VoidLink v1.0.xcdatamodel/contents @@ -74,7 +74,7 @@ - + diff --git a/VoidLink/ViewControllers/MainFrameViewController.m b/VoidLink/ViewControllers/MainFrameViewController.m index 578109f9..d55db02d 100644 --- a/VoidLink/ViewControllers/MainFrameViewController.m +++ b/VoidLink/ViewControllers/MainFrameViewController.m @@ -1645,6 +1645,7 @@ static NSMutableSet* hostList; // if([UIScreen mainScreen].maximumFramesPerSecond < 65) settings.touchMoveEventInterval = @(60); settings.onscreenControls = @(OnScreenControlsLevelCustom); settings.pencilTickIntervalUs = @(1750); + settings.oscLayoutToolFingers = @(666); [dataMan saveData]; } diff --git a/VoidLink/ViewControllers/SettingsViewController.m b/VoidLink/ViewControllers/SettingsViewController.m index 9c5b1e9b..9ab4b57a 100644 --- a/VoidLink/ViewControllers/SettingsViewController.m +++ b/VoidLink/ViewControllers/SettingsViewController.m @@ -822,7 +822,7 @@ BOOL isCustomResolution(int resolutionSelected) { [self addSetting:self.scrollSensitivityStack ofId:@"scrollSensitivityStack" withInfoTag:NO withDynamicLabel:YES to:touchControlSection]; [self addSetting:self.pinchSensitivityStack ofId:@"pinchSensitivityStack" withInfoTag:NO withDynamicLabel:YES to:touchControlSection]; [self addSetting:self.mousePointerVelocityStack ofId:@"mousePointerVelocityStack" withInfoTag:NO withDynamicLabel:YES to:touchControlSection]; - [self addSetting:self.onScreenWidgetStack ofId:@"onScreenWidgetStack" withInfoTag:YES withDynamicLabel:YES to:touchControlSection]; + [self addSetting:self.onScreenWidgetStack ofId:@"onScreenWidgetStack" withInfoTag:YES withDynamicLabel:NO to:touchControlSection]; [self addSetting:self.buttonVisualFeedbackStack ofId:@"buttonVisualFeedbackStack" withInfoTag:NO withDynamicLabel:NO to:touchControlSection]; [self addSetting:self.trackTouchPointStack ofId:@"trackTouchPointStack" withInfoTag:NO withDynamicLabel:NO to:touchControlSection]; [touchControlSection addToParentStack:_parentStack]; @@ -2231,6 +2231,12 @@ BOOL isCustomResolution(int resolutionSelected) { } - (void)showCustomOswTip { + + if (!self->_mainFrameViewController.settingsExpandedInStreamView) { + [self invokeOscLayout]; // Don't open osc layout tool immediately during streaming + } + + /* GenericUtils.autoPopSoftKeyboard = !GenericUtils.isIPhone; NSString* edgeSide = self.slideToSettingsScreenEdgeSelector.selectedSegmentIndex == 1 ? [LocalizationHelper localizedStringForKey:@"left"] : [LocalizationHelper localizedStringForKey:@"right"]; UIAlertController *alertController = [UIAlertController alertControllerWithTitle:[LocalizationHelper localizedStringForKey:@"Rebase in Streaming"] @@ -2250,27 +2256,29 @@ BOOL isCustomResolution(int resolutionSelected) { UIAlertAction *okAction = [UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"OK"] style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { - UITextField *textField = alertController.textFields.firstObject; - NSString *inputText = textField.text; - NSInteger fingers = [inputText integerValue]; - if (inputText.length > 0 && fingers >= 4) { - self->oswLayoutFingers = (uint16_t) fingers; - NSLog(@"OK button tapped with %d fingers", (uint16_t)fingers); - } else { - NSLog(@"OK button tapped with no change"); - } - - // Continue execution after the alert is dismissed - if (!self->_mainFrameViewController.settingsExpandedInStreamView) { - [self invokeOscLayout]; // Don't open osc layout tool immediately during streaming - } - - [self findDynamicLabelFromStack:self.onScreenWidgetStack].text = [self isCustomOswEnabled] ? [LocalizationHelper localizedStringForKey:@"%d finger tap", self->oswLayoutFingers] : @""; - [self handleOswGestureChange];}]; + UITextField *textField = alertController.textFields.firstObject; + NSString *inputText = textField.text; + NSInteger fingers = [inputText integerValue]; + if (inputText.length > 0 && fingers >= 4) { + self->oswLayoutFingers = (uint16_t) fingers; + NSLog(@"OK button tapped with %d fingers", (uint16_t)fingers); + } else { + NSLog(@"OK button tapped with no change"); + } + + // Continue execution after the alert is dismissed + if (!self->_mainFrameViewController.settingsExpandedInStreamView) { + [self invokeOscLayout]; // Don't open osc layout tool immediately during streaming + } + + // [self findDynamicLabelFromStack:self.onScreenWidgetStack].text = [self isCustomOswEnabled] ? [LocalizationHelper localizedStringForKey:@"%d finger tap", self->oswLayoutFingers] : @""; + [self handleOswGestureChange]; + }]; [alertController addAction:cancelAction]; [alertController addAction:okAction]; [self presentViewController:alertController animated:YES completion:nil]; + */ } - (void)hdrSwitchFlipped:(UISwitch* )sender{