separated controller section in settings menu

This commit is contained in:
TrueZhuanjia committed 2025-11-19 14:50:39 +08:00
1 parent d4d5146f66
commit e058839faf
2 files changed
+62 -29

No files matched your search

+27 -4
View File
@@ -1399,6 +1399,29 @@
} }
} }
}, },
"Controller" : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "手柄"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "控制器"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "控制器"
}
}
}
},
"Create New" : { "Create New" : {
"extractionState" : "manual", "extractionState" : "manual",
"localizations" : { "localizations" : {
@@ -5889,25 +5912,25 @@
} }
} }
}, },
"Touch & Controller" : { "Touch Control" : {
"extractionState" : "manual", "extractionState" : "manual",
"localizations" : { "localizations" : {
"zh-Hans" : { "zh-Hans" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "触屏与手柄" "value" : "触控"
} }
}, },
"zh-Hant" : { "zh-Hant" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "觸控與控制器" "value" : "触控"
} }
}, },
"zh-HK" : { "zh-HK" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "觸控與控制器" "value" : "触控"
} }
} }
} }
@@ -48,7 +48,8 @@
CADisplayLink *_autoScrollDisplayLink; CADisplayLink *_autoScrollDisplayLink;
CGFloat _scrollSpeed; CGFloat _scrollSpeed;
CGFloat _currentRefreshRate; CGFloat _currentRefreshRate;
MenuSectionView *touchAndControlSection; MenuSectionView *touchControlSection;
MenuSectionView *controllerSection;
MenuSectionView *motionControlSection; MenuSectionView *motionControlSection;
MenuSectionView *videoSection; MenuSectionView *videoSection;
MenuSectionView *otherSection; MenuSectionView *otherSection;
@@ -724,34 +725,43 @@ BOOL isCustomResolution(int resolutionSelected) {
[videoSection addToParentStack:_parentStack]; [videoSection addToParentStack:_parentStack];
// [videoSection setExpanded:NO]; // [videoSection setExpanded:NO];
touchAndControlSection = [[MenuSectionView alloc] init]; touchControlSection = [[MenuSectionView alloc] init];
touchAndControlSection.delegate = self; touchControlSection.delegate = self;
touchAndControlSection.sectionTitle = [LocalizationHelper localizedStringForKey:@"Touch & Controller"]; touchControlSection.sectionTitle = [LocalizationHelper localizedStringForKey:@"Touch Control"];
touchAndControlSection.identifier = @"SettingsSectionTouch&Controller"; touchControlSection.identifier = @"SettingsSectionTouch&Controller";
if (@available(iOS 13.0, *)) { if (@available(iOS 13.0, *)) {
[touchAndControlSection setSectionWithIcon:[UIImage imageNamed:@"arcade.stick.console"] andSize:20.5]; [touchControlSection setSectionWithIcon:[UIImage imageNamed:@"arcade.stick.console"] andSize:20.5];
} }
[self addSetting:self.touchModeStack ofId:@"touchModeStack" withInfoTag:YES withDynamicLabel:NO to:touchAndControlSection]; [self addSetting:self.touchModeStack ofId:@"touchModeStack" withInfoTag:YES withDynamicLabel:NO to:touchControlSection];
[self addSetting:self.mousePointerVelocityStack ofId:@"mousePointerVelocityStack" withInfoTag:NO withDynamicLabel:YES to:touchAndControlSection]; [self addSetting:self.mousePointerVelocityStack ofId:@"mousePointerVelocityStack" withInfoTag:NO withDynamicLabel:YES to:touchControlSection];
[self addSetting:self.pointerVelocityDividerStack ofId:@"pointerVelocityDividerStack" withInfoTag:YES withDynamicLabel:YES to:touchAndControlSection]; [self addSetting:self.pointerVelocityDividerStack ofId:@"pointerVelocityDividerStack" withInfoTag:YES withDynamicLabel:YES to:touchControlSection];
[self addSetting:self.pointerVelocityFactorStack ofId:@"pointerVelocityFactorStack" withInfoTag:YES withDynamicLabel:YES to:touchAndControlSection]; [self addSetting:self.pointerVelocityFactorStack ofId:@"pointerVelocityFactorStack" withInfoTag:YES withDynamicLabel:YES to:touchControlSection];
[self addSetting:self.delayLeftClickStack ofId:@"delayLeftClickStack" withInfoTag:YES withDynamicLabel:NO to:touchAndControlSection]; [self addSetting:self.delayLeftClickStack ofId:@"delayLeftClickStack" withInfoTag:YES withDynamicLabel:NO to:touchControlSection];
[self addSetting:self.passthroughGesturesStack ofId:@"passthroughGesturesStack" withInfoTag:NO withDynamicLabel:NO to:touchAndControlSection]; [self addSetting:self.passthroughGesturesStack ofId:@"passthroughGesturesStack" withInfoTag:NO withDynamicLabel:NO to:touchControlSection];
[self addSetting:self.pinchGestureStack ofId:@"pinchGestureStack" withInfoTag:NO withDynamicLabel:NO to:touchAndControlSection]; [self addSetting:self.pinchGestureStack ofId:@"pinchGestureStack" withInfoTag:NO withDynamicLabel:NO to:touchControlSection];
[self addSetting:self.ctrlDownForPinchStack ofId:@"ctrlDownForPinchStack" withInfoTag:YES withDynamicLabel:NO to:touchAndControlSection]; [self addSetting:self.ctrlDownForPinchStack ofId:@"ctrlDownForPinchStack" withInfoTag:YES withDynamicLabel:NO to:touchControlSection];
[self addSetting:self.scrollSensitivityStack ofId:@"scrollSensitivityStack" withInfoTag:NO withDynamicLabel:YES to:touchAndControlSection]; [self addSetting:self.scrollSensitivityStack ofId:@"scrollSensitivityStack" withInfoTag:NO withDynamicLabel:YES to:touchControlSection];
[self addSetting:self.pinchSensitivityStack ofId:@"pinchSensitivityStack" withInfoTag:NO withDynamicLabel:YES to:touchAndControlSection]; [self addSetting:self.pinchSensitivityStack ofId:@"pinchSensitivityStack" withInfoTag:NO withDynamicLabel:YES to:touchControlSection];
[self addSetting:self.mousePointerVelocityStack ofId:@"mousePointerVelocityStack" withInfoTag:NO withDynamicLabel:YES to:touchAndControlSection]; [self addSetting:self.mousePointerVelocityStack ofId:@"mousePointerVelocityStack" withInfoTag:NO withDynamicLabel:YES to:touchControlSection];
[self addSetting:self.onScreenWidgetStack ofId:@"onScreenWidgetStack" withInfoTag:YES withDynamicLabel:YES to:touchAndControlSection]; [self addSetting:self.onScreenWidgetStack ofId:@"onScreenWidgetStack" withInfoTag:YES withDynamicLabel:YES to:touchControlSection];
[self addSetting:self.buttonVisualFeedbackStack ofId:@"buttonVisualFeedbackStack" withInfoTag:NO withDynamicLabel:NO to:touchAndControlSection]; [self addSetting:self.buttonVisualFeedbackStack ofId:@"buttonVisualFeedbackStack" withInfoTag:NO withDynamicLabel:NO to:touchControlSection];
[self addSetting:self.swapAbxyStack ofId:@"swapAbaxyStack" withInfoTag:NO withDynamicLabel:NO to:touchAndControlSection]; [touchControlSection addToParentStack:_parentStack];
[self addSetting:self.hapticEngineStack ofId:@"hapticEngineStack" withInfoTag:NO withDynamicLabel:NO to:touchAndControlSection];
[self addSetting:self.emulatedControllerTypeStack ofId:@"emulatedControllerTypeStack" withInfoTag:YES withDynamicLabel:NO to:touchAndControlSection];
[self addSetting:self.gyroModeStack ofId:@"gyroModeStack" withInfoTag:YES withDynamicLabel:YES to:touchAndControlSection];
[self addSetting:self.gyroSensitivityStack ofId:@"gyroSensitivityStack" withInfoTag:NO withDynamicLabel:YES to:touchAndControlSection];
[touchAndControlSection addToParentStack:_parentStack];
// [touchAndControlSection setExpanded:NO]; // [touchAndControlSection setExpanded:NO];
controllerSection = [[MenuSectionView alloc] init];
controllerSection.delegate = self;
controllerSection.sectionTitle = [LocalizationHelper localizedStringForKey:@"Controller"];
controllerSection.identifier = @"SettingsSectionController";
if (@available(iOS 13.0, *)) {
[controllerSection setSectionWithIcon:[UIImage systemImageNamed:@"gamecontroller"] andSize:26];
}
[self addSetting:self.swapAbxyStack ofId:@"swapAbaxyStack" withInfoTag:NO withDynamicLabel:NO to:controllerSection];
[self addSetting:self.hapticEngineStack ofId:@"hapticEngineStack" withInfoTag:NO withDynamicLabel:NO to:controllerSection];
[self addSetting:self.emulatedControllerTypeStack ofId:@"emulatedControllerTypeStack" withInfoTag:YES withDynamicLabel:NO to:controllerSection];
[self addSetting:self.gyroModeStack ofId:@"gyroModeStack" withInfoTag:YES withDynamicLabel:YES to:controllerSection];
[self addSetting:self.gyroSensitivityStack ofId:@"gyroSensitivityStack" withInfoTag:NO withDynamicLabel:YES to:controllerSection];
[controllerSection addToParentStack:_parentStack];
motionControlSection = [[MenuSectionView alloc] init]; motionControlSection = [[MenuSectionView alloc] init];
motionControlSection.delegate = self; motionControlSection.delegate = self;
motionControlSection.sectionTitle = [LocalizationHelper localizedStringForKey:@"Motion Control"]; motionControlSection.sectionTitle = [LocalizationHelper localizedStringForKey:@"Motion Control"];