diff --git a/VoidLink/Base.lproj/iPad.storyboard b/VoidLink/Base.lproj/iPad.storyboard index 0b4c7f22..4fcdccb6 100644 --- a/VoidLink/Base.lproj/iPad.storyboard +++ b/VoidLink/Base.lproj/iPad.storyboard @@ -988,8 +988,8 @@ - - + + @@ -1001,7 +1001,7 @@ - + @@ -1788,7 +1788,7 @@ - + @@ -1797,13 +1797,13 @@ - + - + - + diff --git a/VoidLink/Base.lproj/iPhone.storyboard b/VoidLink/Base.lproj/iPhone.storyboard index 64a781f2..b0836e15 100644 --- a/VoidLink/Base.lproj/iPhone.storyboard +++ b/VoidLink/Base.lproj/iPhone.storyboard @@ -1696,7 +1696,7 @@ - + @@ -1821,19 +1821,19 @@ - + - + - + - + diff --git a/VoidLink/Localization/Localizable.xcstrings b/VoidLink/Localization/Localizable.xcstrings index ffc3aadd..47d6972a 100644 --- a/VoidLink/Localization/Localizable.xcstrings +++ b/VoidLink/Localization/Localizable.xcstrings @@ -24,6 +24,29 @@ } } }, + " %d%% opacity " : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : " %d%%不透明度 " + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : " %d%%不透明度 " + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : " %d%%不透明度 " + } + } + } + }, " disconnect " : { "extractionState" : "manual", "localizations" : { @@ -421,29 +444,6 @@ } } }, - "%d%% opacity" : { - "extractionState" : "manual", - "localizations" : { - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "%d%%不透明度" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "%d%%不透明度" - } - }, - "zh-HK" : { - "stringUnit" : { - "state" : "translated", - "value" : "%d%%不透明度" - } - } - } - }, "%d%% screen width" : { "extractionState" : "manual", "localizations" : { diff --git a/VoidLink/ViewControllers/SettingsViewController.m b/VoidLink/ViewControllers/SettingsViewController.m index e1540da3..83ebda87 100644 --- a/VoidLink/ViewControllers/SettingsViewController.m +++ b/VoidLink/ViewControllers/SettingsViewController.m @@ -40,6 +40,8 @@ CGFloat _scrollSpeed; CGFloat _currentRefreshRate; MenuSectionView *touchAndControlSection; + MenuSectionView *videoSection; + MenuSectionView *otherSection; NSMutableSet* hiddenStacks; } @@ -543,7 +545,7 @@ BOOL isCustomResolution(int resolutionSelected) { } - (void)layoutSections{ - MenuSectionView *videoSection = [[MenuSectionView alloc] init]; + videoSection = [[MenuSectionView alloc] init]; videoSection.delegate = self; videoSection.sectionTitle = [LocalizationHelper localizedStringForKey:@"Video"]; if (@available(iOS 13.0, *)) { @@ -557,8 +559,8 @@ BOOL isCustomResolution(int resolutionSelected) { [self addSetting:self.yuv444Stack ofId:@"yuv444Stack" withInfoTag:YES withDynamicLabel:NO to:videoSection]; [self addSetting:self.pipStack ofId:@"pipStack" withInfoTag:YES withDynamicLabel:NO to:videoSection]; [self addSetting:self.pipStack ofId:@"pipStack" withInfoTag:YES withDynamicLabel:NO to:videoSection]; - [self addSetting:self.frameQueueSizeStack ofId:@"frameQueueSizeStack" withInfoTag:NO withDynamicLabel:YES to:videoSection]; [self addSetting:self.framePacingStack ofId:@"framePacingStack" withInfoTag:YES withDynamicLabel:NO to:videoSection]; + [self addSetting:self.frameQueueSizeStack ofId:@"frameQueueSizeStack" withInfoTag:NO withDynamicLabel:YES to:videoSection]; // Only show Metal renderer option on iOS 17+ where CAMetalDisplayLink is available if (@available(iOS 17.0, *)) { @@ -630,7 +632,7 @@ BOOL isCustomResolution(int resolutionSelected) { [audioSection setExpanded:YES]; - MenuSectionView *otherSection = [[MenuSectionView alloc] init]; + otherSection = [[MenuSectionView alloc] init]; otherSection.delegate = self; otherSection.sectionTitle = [LocalizationHelper localizedStringForKey:@"Others"]; if (@available(iOS 13.0, *)) { @@ -1489,8 +1491,8 @@ BOOL isCustomResolution(int resolutionSelected) { [self frameQueueSizeSliderMoved:self.frameQueueSizeSlider]; [self.enableGraphsSwitch setOn:currentSettings.enableGraphs animated:NO]; // Add this line - [self.enableGraphsSwitch addTarget:self action:@selector(enableGraphsChanged) forControlEvents:UIControlEventValueChanged]; - [self enableGraphsChanged]; + [self.enableGraphsSwitch addTarget:self action:@selector(enableGraphsChanged:) forControlEvents:UIControlEventValueChanged]; + [self enableGraphsChanged:self.enableGraphsSwitch]; [self.graphOpacityStepper setMinimumValue:0]; [self.graphOpacityStepper setMaximumValue:100]; [self.graphOpacityStepper setValue:(int)currentSettings.graphOpacity.intValue]; @@ -1738,21 +1740,35 @@ BOOL isCustomResolution(int resolutionSelected) { } - (void)framePacingModeChanged:(UISegmentedControl *)sender { - + [self setHidden:sender.selectedSegmentIndex == FramePacingModeLegacy forStack:self.frameQueueSizeStack]; + [videoSection updateViewForFoldState]; + + if(sender.selectedSegmentIndex == FramePacingModeLegacy){ + [self.enableGraphsSwitch setOn:NO]; + [self findDynamicLabelFromStack:_graphOpacityStack].hidden = YES; + } + [self.enableGraphsSwitch setEnabled:sender.selectedSegmentIndex == FramePacingModeQueue]; + [self.graphOpacityStepper setEnabled:self.enableGraphsSwitch.isOn]; + [self setHidden:sender.selectedSegmentIndex == FramePacingModeLegacy forStack:self.performanceGraphStack]; + [otherSection updateViewForFoldState]; + + /* if (sender.selectedSegmentIndex == FramePacingModeLegacy) { // Legacy mode selected - disable frames to buffer and graph settings [self.frameQueueSizeSlider setEnabled:NO]; [self.enableGraphsSwitch setOn:NO animated:YES]; + [self.enableGraphsSwitch setEnabled:NO]; [self.graphOpacityStepper setEnabled:NO]; } else { // Queue mode selected - enable frames to buffer and graph settings [self.frameQueueSizeSlider setEnabled:YES]; [self.enableGraphsSwitch setEnabled:YES]; + if (self.enableGraphsSwitch.isOn) { [self.graphOpacityStepper setEnabled:YES]; } - } + }*/ } - (void)onScreenWidgetChanged{ @@ -2267,8 +2283,9 @@ BOOL isCustomResolution(int resolutionSelected) { [self findDynamicLabelFromStack:_frameQueueSizeStack].text = [NSString stringWithFormat:@" %d ", (int)self.frameQueueSizeSlider.value]; } -- (void) enableGraphsChanged { - [self.graphOpacityStepper setEnabled:[self.enableGraphsSwitch isOn]]; +- (void) enableGraphsChanged:(UISwitch* )sender { + [self.graphOpacityStepper setEnabled:sender.isOn]; + [self findDynamicLabelFromStack:self.graphOpacityStack].hidden = !sender.isOn; } - (void) graphOpacityStepperTapped:(UIStepper* )sender { diff --git a/VoidLink/mul.lproj/iPad.xcstrings b/VoidLink/mul.lproj/iPad.xcstrings index eee395c4..2cbf8056 100644 --- a/VoidLink/mul.lproj/iPad.xcstrings +++ b/VoidLink/mul.lproj/iPad.xcstrings @@ -44,49 +44,49 @@ "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "旧版" + "value" : "传统模式" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "舊版" + "value" : "傳統模式" } }, "zh-HK" : { "stringUnit" : { "state" : "translated", - "value" : "舊版" + "value" : "傳統模式" } } } }, "2Dp-Qg-chi.segmentTitles[1]" : { - "comment" : "Class = \"UISegmentedControl\"; 2Dp-Qg-chi.segmentTitles[1] = \"Queue\"; ObjectID = \"2Dp-Qg-chi\";", + "comment" : "Class = \"UISegmentedControl\"; 2Dp-Qg-chi.segmentTitles[1] = \"Queue Buffering\"; ObjectID = \"2Dp-Qg-chi\";", "extractionState" : "extracted_with_value", "localizations" : { "en" : { "stringUnit" : { "state" : "new", - "value" : "Queue" + "value" : "Queue Buffering" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", - "value" : "佇列" + "state" : "needs_review", + "value" : "队列缓冲" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", - "value" : "佇列" + "state" : "needs_review", + "value" : "佇列緩衝" } }, "zh-HK" : { "stringUnit" : { - "state" : "translated", - "value" : "佇列" + "state" : "needs_review", + "value" : "佇列緩衝" } } } @@ -1033,36 +1033,6 @@ } } }, - "ccm-n2-PXi.text" : { - "comment" : "Class = \"UILabel\"; text = \"Performance Graphs - Opacity: 50%\"; ObjectID = \"ccm-n2-PXi\";", - "extractionState" : "stale", - "localizations" : { - "en" : { - "stringUnit" : { - "state" : "new", - "value" : "Performance Graphs - Opacity: 50%" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "性能图表 - 不透明度:50%" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "效能圖表 - 不透明度:50%" - } - }, - "zh-HK" : { - "stringUnit" : { - "state" : "translated", - "value" : "效能圖表 - 不透明度:50%" - } - } - } - }, "Ce3-FM-vIh.text" : { "comment" : "Class = \"UILabel\"; text = \"Frames to Buffer\"; ObjectID = \"Ce3-FM-vIh\";", "extractionState" : "extracted_with_value", @@ -1411,36 +1381,6 @@ } } }, - "dK2-1g-PUQ.text" : { - "comment" : "Class = \"UILabel\"; text = \"Displays frametime and buffer health metrics. Adjust the opacity if they obscure parts of the screen. Swipe up/down with two fingers to show or hide all stats.\"; ObjectID = \"dK2-1g-PUQ\";", - "extractionState" : "stale", - "localizations" : { - "en" : { - "stringUnit" : { - "state" : "new", - "value" : "Displays frametime and buffer health metrics. Adjust the opacity if they obscure parts of the screen. Swipe up/down with two fingers to show or hide all stats." - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "显示帧时间和缓冲健康指标。如果遮挡屏幕部分内容,请调整透明度。用两指上下滑动以显示或隐藏所有统计信息。" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "顯示影格時間與緩衝健康指標。如遮擋螢幕部分內容,請調整透明度。用兩指上下滑動以顯示或隱藏所有統計資訊。" - } - }, - "zh-HK" : { - "stringUnit" : { - "state" : "translated", - "value" : "顯示影格時間與緩衝健康指標。如遮擋螢幕部分內容,請調整透明度。用兩指上下滑動以顯示或隱藏所有統計資訊。" - } - } - } - }, "dOF-FW-cBU.text" : { "comment" : "Class = \"UILabel\"; text = \" \"; ObjectID = \"dOF-FW-cBU\";", "extractionState" : "extracted_with_value", @@ -2384,19 +2324,19 @@ "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "帧缓冲模式" + "value" : "帧步进控制" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "幀緩衝模式" + "value" : "影格步調" } }, "zh-HK" : { "stringUnit" : { "state" : "translated", - "value" : "幀緩衝模式" + "value" : "影格步調" } } } @@ -3322,6 +3262,24 @@ "state" : "new", "value" : "Performance Graphs " } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "性能图表" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "效能圖表" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "效能圖表" + } } } }, diff --git a/VoidLink/mul.lproj/iPhone.xcstrings b/VoidLink/mul.lproj/iPhone.xcstrings index c0d6cf3e..8115fdda 100644 --- a/VoidLink/mul.lproj/iPhone.xcstrings +++ b/VoidLink/mul.lproj/iPhone.xcstrings @@ -91,36 +91,6 @@ } } }, - "3Ff-AF-K42.text" : { - "comment" : "Class = \"UILabel\"; text = \"Displays frametime and buffer health metrics. Adjust the opacity if they obscure parts of the screen. Swipe up/down with two fingers to show or hide all stats.\"; ObjectID = \"3Ff-AF-K42\";", - "extractionState" : "stale", - "localizations" : { - "en" : { - "stringUnit" : { - "state" : "new", - "value" : "Displays frametime and buffer health metrics. Adjust the opacity if they obscure parts of the screen. Swipe up/down with two fingers to show or hide all stats." - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "显示帧时间和缓冲健康指标。如果遮挡屏幕部分内容,请调整透明度。" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "顯示影格時間與緩衝健康指標。如遮擋螢幕部分內容,請調整透明度。" - } - }, - "zh-HK" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "顯示影格時間與緩衝健康指標。如遮擋螢幕部分內容,請調整透明度。" - } - } - } - }, "3Hh-2q-gas.text" : { "comment" : "Class = \"UILabel\"; text = \"Preferred Codec\"; ObjectID = \"3Hh-2q-gas\";", "extractionState" : "extracted_with_value", @@ -1100,49 +1070,49 @@ "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "旧版" + "value" : "传统模式" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "舊版" + "value" : "傳統模式" } }, "zh-HK" : { "stringUnit" : { "state" : "translated", - "value" : "舊版" + "value" : "傳統模式" } } } }, "CC6-pu-Uoh.segmentTitles[1]" : { - "comment" : "Class = \"UISegmentedControl\"; CC6-pu-Uoh.segmentTitles[1] = \"Queue\"; ObjectID = \"CC6-pu-Uoh\";", + "comment" : "Class = \"UISegmentedControl\"; CC6-pu-Uoh.segmentTitles[1] = \"Queue Buffering\"; ObjectID = \"CC6-pu-Uoh\";", "extractionState" : "extracted_with_value", "localizations" : { "en" : { "stringUnit" : { "state" : "new", - "value" : "Queue" + "value" : "Queue Buffering" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", - "value" : "佇列" + "state" : "needs_review", + "value" : "队列缓冲" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", - "value" : "佇列" + "state" : "needs_review", + "value" : "佇列緩衝" } }, "zh-HK" : { "stringUnit" : { - "state" : "translated", - "value" : "佇列" + "state" : "needs_review", + "value" : "佇列緩衝" } } } @@ -1250,19 +1220,19 @@ "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "帧缓冲模式" + "value" : "帧步进控制" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "幀緩衝模式" + "value" : "影格步調" } }, "zh-HK" : { "stringUnit" : { "state" : "translated", - "value" : "幀緩衝模式" + "value" : "影格步調" } } }