cancel tap gesture for widget layout tool

This commit is contained in:
True Zhuanjia committed 2026-04-08 02:25:57 +08:00
1 parent 94f1c625be
commit 6b085982f1
3 files changed
+26 -17

No files matched your search

@@ -74,7 +74,7 @@
<attribute name="muteInBackground" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/> <attribute name="muteInBackground" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
<attribute name="onscreenControls" attributeType="Integer 32" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/> <attribute name="onscreenControls" attributeType="Integer 32" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/>
<attribute name="optimizeGames" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/> <attribute name="optimizeGames" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/>
<attribute name="oscLayoutToolFingers" optional="YES" attributeType="Integer 16" defaultValueString="4" usesScalarValueType="NO" syncable="YES"/> <attribute name="oscLayoutToolFingers" optional="YES" attributeType="Integer 16" defaultValueString="666" usesScalarValueType="NO" syncable="YES"/>
<attribute name="passthroughGestures" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/> <attribute name="passthroughGestures" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
<attribute name="pencilTickIntervalUs" optional="YES" attributeType="Float" defaultValueString="2000" usesScalarValueType="NO" syncable="YES"/> <attribute name="pencilTickIntervalUs" optional="YES" attributeType="Float" defaultValueString="2000" usesScalarValueType="NO" syncable="YES"/>
<attribute name="pencilTickMode" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> <attribute name="pencilTickMode" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
@@ -1645,6 +1645,7 @@ static NSMutableSet* hostList;
// if([UIScreen mainScreen].maximumFramesPerSecond < 65) settings.touchMoveEventInterval = @(60); // if([UIScreen mainScreen].maximumFramesPerSecond < 65) settings.touchMoveEventInterval = @(60);
settings.onscreenControls = @(OnScreenControlsLevelCustom); settings.onscreenControls = @(OnScreenControlsLevelCustom);
settings.pencilTickIntervalUs = @(1750); settings.pencilTickIntervalUs = @(1750);
settings.oscLayoutToolFingers = @(666);
[dataMan saveData]; [dataMan saveData];
} }
@@ -822,7 +822,7 @@ BOOL isCustomResolution(int resolutionSelected) {
[self addSetting:self.scrollSensitivityStack ofId:@"scrollSensitivityStack" withInfoTag:NO withDynamicLabel:YES to:touchControlSection]; [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.pinchSensitivityStack ofId:@"pinchSensitivityStack" withInfoTag:NO withDynamicLabel:YES to:touchControlSection];
[self addSetting:self.mousePointerVelocityStack ofId:@"mousePointerVelocityStack" 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.buttonVisualFeedbackStack ofId:@"buttonVisualFeedbackStack" withInfoTag:NO withDynamicLabel:NO to:touchControlSection];
[self addSetting:self.trackTouchPointStack ofId:@"trackTouchPointStack" withInfoTag:NO withDynamicLabel:NO to:touchControlSection]; [self addSetting:self.trackTouchPointStack ofId:@"trackTouchPointStack" withInfoTag:NO withDynamicLabel:NO to:touchControlSection];
[touchControlSection addToParentStack:_parentStack]; [touchControlSection addToParentStack:_parentStack];
@@ -2231,6 +2231,12 @@ BOOL isCustomResolution(int resolutionSelected) {
} }
- (void)showCustomOswTip { - (void)showCustomOswTip {
if (!self->_mainFrameViewController.settingsExpandedInStreamView) {
[self invokeOscLayout]; // Don't open osc layout tool immediately during streaming
}
/*
GenericUtils.autoPopSoftKeyboard = !GenericUtils.isIPhone; GenericUtils.autoPopSoftKeyboard = !GenericUtils.isIPhone;
NSString* edgeSide = self.slideToSettingsScreenEdgeSelector.selectedSegmentIndex == 1 ? [LocalizationHelper localizedStringForKey:@"left"] : [LocalizationHelper localizedStringForKey:@"right"]; NSString* edgeSide = self.slideToSettingsScreenEdgeSelector.selectedSegmentIndex == 1 ? [LocalizationHelper localizedStringForKey:@"left"] : [LocalizationHelper localizedStringForKey:@"right"];
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:[LocalizationHelper localizedStringForKey:@"Rebase in Streaming"] UIAlertController *alertController = [UIAlertController alertControllerWithTitle:[LocalizationHelper localizedStringForKey:@"Rebase in Streaming"]
@@ -2250,27 +2256,29 @@ BOOL isCustomResolution(int resolutionSelected) {
UIAlertAction *okAction = [UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"OK"] UIAlertAction *okAction = [UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"OK"]
style:UIAlertActionStyleDefault style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) { handler:^(UIAlertAction *action) {
UITextField *textField = alertController.textFields.firstObject; UITextField *textField = alertController.textFields.firstObject;
NSString *inputText = textField.text; NSString *inputText = textField.text;
NSInteger fingers = [inputText integerValue]; NSInteger fingers = [inputText integerValue];
if (inputText.length > 0 && fingers >= 4) { if (inputText.length > 0 && fingers >= 4) {
self->oswLayoutFingers = (uint16_t) fingers; self->oswLayoutFingers = (uint16_t) fingers;
NSLog(@"OK button tapped with %d fingers", (uint16_t)fingers); NSLog(@"OK button tapped with %d fingers", (uint16_t)fingers);
} else { } else {
NSLog(@"OK button tapped with no change"); NSLog(@"OK button tapped with no change");
} }
// Continue execution after the alert is dismissed // Continue execution after the alert is dismissed
if (!self->_mainFrameViewController.settingsExpandedInStreamView) { if (!self->_mainFrameViewController.settingsExpandedInStreamView) {
[self invokeOscLayout]; // Don't open osc layout tool immediately during streaming [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 findDynamicLabelFromStack:self.onScreenWidgetStack].text = [self isCustomOswEnabled] ? [LocalizationHelper localizedStringForKey:@"%d finger tap", self->oswLayoutFingers] : @"";
[self handleOswGestureChange];}]; [self handleOswGestureChange];
}];
[alertController addAction:cancelAction]; [alertController addAction:cancelAction];
[alertController addAction:okAction]; [alertController addAction:okAction];
[self presentViewController:alertController animated:YES completion:nil]; [self presentViewController:alertController animated:YES completion:nil];
*/
} }
- (void)hdrSwitchFlipped:(UISwitch* )sender{ - (void)hdrSwitchFlipped:(UISwitch* )sender{