diff --git a/CollapseLauncher/Classes/GameManagement/GameSettings/StarRail/RegistryClass/Model.cs b/CollapseLauncher/Classes/GameManagement/GameSettings/StarRail/RegistryClass/Model.cs index 979e57d77..95d02e55a 100644 --- a/CollapseLauncher/Classes/GameManagement/GameSettings/StarRail/RegistryClass/Model.cs +++ b/CollapseLauncher/Classes/GameManagement/GameSettings/StarRail/RegistryClass/Model.cs @@ -29,6 +29,13 @@ public enum AntialiasingMode // TypeDefIndex: 25409 TAA = 1, FXAA = 2 } + + public enum CharacterQualityEnum + { + Low = 2, + Medium = 3, + High = 4 + } #endregion internal class Model : IGameSettingsValue<Model> @@ -97,7 +104,7 @@ private static Dictionary<int, int> GenerateStaticFPSIndexDict() /// Options: Low (2), Medium(3), High(4) /// Default: Medium /// </summary> - public Quality CharacterQuality { get; set; } = Quality.Medium; + public CharacterQualityEnum CharacterQuality { get; set; } = CharacterQualityEnum.Medium; /// <summary> /// This defines "<c>Environment Quality</c>" combobox In-game settings. <br/> diff --git a/CollapseLauncher/Classes/GameManagement/GameSettings/StarRail/Settings.cs b/CollapseLauncher/Classes/GameManagement/GameSettings/StarRail/Settings.cs index 0ebe3ab36..4273e21be 100644 --- a/CollapseLauncher/Classes/GameManagement/GameSettings/StarRail/Settings.cs +++ b/CollapseLauncher/Classes/GameManagement/GameSettings/StarRail/Settings.cs @@ -39,21 +39,26 @@ public StarRailSettings(IGameVersionCheck GameVersionManager) private void InitializeSettings() { - // Load Settings + // Load Settings required for MainPage SettingsCustomArgument = CustomArgs.Load(); - GraphicsSettings = Model.Load(); SettingsCollapseScreen = CollapseScreenSetting.Load(); - SettingsCollapseMisc = CollapseMiscSetting.Load(); - SettingsScreen = PCResolution.Load(); - AudioSettings_BGM = BGMVolume.Load(); - AudioSettings_Master = MasterVolume.Load(); - AudioSettings_SFX = SFXVolume.Load(); - AudioSettings_VO = VOVolume.Load(); - AudioLanguage = LocalAudioLanguage.Load(); - TextLanguage = LocalTextLanguage.Load(); + SettingsCollapseMisc = CollapseMiscSetting.Load(); + SettingsScreen = PCResolution.Load(); + } - public void ReloadSettings() => InitializeSettings(); + public void ReloadSettings() + { + // Load rest of the settings for GSP + AudioSettings_BGM = BGMVolume.Load(); + AudioSettings_Master = MasterVolume.Load(); + AudioSettings_SFX = SFXVolume.Load(); + AudioSettings_VO = VOVolume.Load(); + AudioLanguage = LocalAudioLanguage.Load(); + TextLanguage = LocalTextLanguage.Load(); + GraphicsSettings = Model.Load(); + InitializeSettings(); + } public void SaveSettings() { diff --git a/CollapseLauncher/Classes/GameManagement/GameSettings/Universal/RegistryClass/CollapseMiscSetting.cs b/CollapseLauncher/Classes/GameManagement/GameSettings/Universal/RegistryClass/CollapseMiscSetting.cs index 3602746a1..3d97c6b67 100644 --- a/CollapseLauncher/Classes/GameManagement/GameSettings/Universal/RegistryClass/CollapseMiscSetting.cs +++ b/CollapseLauncher/Classes/GameManagement/GameSettings/Universal/RegistryClass/CollapseMiscSetting.cs @@ -15,6 +15,8 @@ internal class CollapseMiscSetting : IGameSettingsValue<CollapseMiscSetting> private const string _ValueName = "CollapseLauncher_Misc"; private bool _UseCustomArguments = true; + + private static bool _IsDeserializing; #endregion #region Properties @@ -34,9 +36,45 @@ public bool UseCustomArguments set { _UseCustomArguments = value; - Save(); + // Stop saving if Load() is not yet done. + if (!_IsDeserializing) Save(); } } + + /// <summary> + /// This define if Advanced Game Settings should be shown in respective GSP and used.<br/><br/> + /// Default: false + /// </summary> + public bool UseAdvancedGameSettings { get; set; } = false; + + /// <summary> + /// This control if GamePreLaunchCommand is going to be used. <br/><br/> + /// Default: false + /// </summary> + public bool UseGamePreLaunchCommand { get; set; } = false; + + /// <summary> + /// This sets the command that is going to be launched before the game process is invoked.<br/><br/> + /// Command is launched as a shell with no window.<br/><br/> + /// </summary> + public string GamePreLaunchCommand { get; set; } = ""; + + /// <summary> + /// Close GamePreLaunch process when game is stopped.<br/><br/> + /// </summary> + public bool GamePreLaunchExitOnGameStop { get; set; } = false; + + /// <summary> + /// This control if GamePostLaunchCommand is going to be used. <br/><br/> + /// Default: false + /// </summary> + public bool UseGamePostExitCommand { get; set; } = false; + + /// <summary> + /// This sets the command that is going to be launched after the game process is closed.<br/><br/> + /// Command is launched as a shell with no window.<br/><br/> + /// </summary> + public string GamePostExitCommand { get; set; } = ""; #endregion #region Methods @@ -45,6 +83,7 @@ public static CollapseMiscSetting Load() { try { + _IsDeserializing = true; if (RegistryRoot == null) throw new NullReferenceException($"Cannot load {_ValueName} RegistryKey is unexpectedly not initialized!"); object? value = RegistryRoot.GetValue(_ValueName, null); @@ -52,16 +91,20 @@ public static CollapseMiscSetting Load() if (value != null) { ReadOnlySpan<byte> byteStr = (byte[])value; -#if DEBUG + #if DEBUG LogWriteLine($"Loaded Collapse Misc Settings:\r\n{Encoding.UTF8.GetString(byteStr.TrimEnd((byte)0))}", LogType.Debug, true); -#endif + #endif return byteStr.Deserialize<CollapseMiscSetting>(UniversalSettingsJSONContext.Default) ?? new CollapseMiscSetting(); } } - catch (Exception ex) + catch ( Exception ex ) { LogWriteLine($"Failed while reading {_ValueName}\r\n{ex}", LogType.Error, true); } + finally + { + _IsDeserializing = false; + } return new CollapseMiscSetting(); } diff --git a/CollapseLauncher/XAMLs/MainApp/MainPage.xaml.cs b/CollapseLauncher/XAMLs/MainApp/MainPage.xaml.cs index 56c5dffd2..d643ddb39 100644 --- a/CollapseLauncher/XAMLs/MainApp/MainPage.xaml.cs +++ b/CollapseLauncher/XAMLs/MainApp/MainPage.xaml.cs @@ -1113,7 +1113,7 @@ private void InitializeNavigationItems(bool ResetSelection = true) { case GameType.Honkai: NavigationViewControl.MenuItems.Add(new NavigationViewItem() - { Content = Lang._GameSettingsPage.PageTitle, Icon = IconGameSettings, Tag = "gamesettings" }); + { Content = Lang._GameSettingsPage.PageTitle, Icon = IconGameSettings, Tag = "honkaigamesettings" }); break; case GameType.StarRail: NavigationViewControl.MenuItems.Add(new NavigationViewItem() @@ -1183,8 +1183,8 @@ void NavigateInnerSwitch(string itemTag) Navigate(typeof(UnavailablePage), itemTag); break; - case "gamesettings": - Navigate(IsGameInstalled() ? typeof(GameSettingsPage) : typeof(NotInstalledPage), itemTag); + case "honkaigamesettings": + Navigate(IsGameInstalled() ? typeof(HonkaiGameSettingsPage) : typeof(NotInstalledPage), itemTag); break; case "starrailgamesettings": @@ -1768,7 +1768,7 @@ private void GoGameSettings_Invoked(KeyboardAccelerator sender, KeyboardAccelera switch (CurrentGameProperty._GamePreset.GameType) { case GameType.Honkai: - Navigate(typeof(GameSettingsPage), "gamesettings"); + Navigate(typeof(HonkaiGameSettingsPage), "honkaigamesettings"); break; case GameType.Genshin: Navigate(typeof(GenshinGameSettingsPage), "genshingamesettings"); diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPage.xaml b/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPage.xaml deleted file mode 100644 index 67553989b..000000000 --- a/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPage.xaml +++ /dev/null @@ -1,476 +0,0 @@ -<Page - x:Class="CollapseLauncher.Pages.GameSettingsPage" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:CollapseLauncher" - xmlns:helper="using:Hi3Helper" - xmlns:conv="using:CollapseLauncher.Pages" - xmlns:settype="using:CollapseLauncher.GameSettings" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - mc:Ignorable="d" - Loaded="InitializeSettings" Unloaded="OnUnload"> - <Page.Resources> - <ThemeShadow x:Name="SharedShadow"/> - <conv:InverseBooleanConverter x:Key="BooleanInverse"/> - </Page.Resources> - <Grid> - <Grid x:Name="PageContent"> - <ScrollViewer VerticalScrollBarVisibility="Auto"> - <StackPanel Margin="32,40,32,32" Padding="0,0,0,74"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Title}" Style="{ThemeResource TitleLargeTextBlockStyle}" Margin="0,0,0,16"/> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0"> - <StackPanel x:Name="GameResolutionPanel" Margin="0,16"> - <StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResolutionPanel}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,0,0,16"/> - <StackPanel x:Name="GameResolutionWindow" Orientation="Vertical" Margin="0,0,0,8"> - <CheckBox x:Name="GameResolutionFullscreen" Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Fullscreen}" - HorizontalAlignment="Left" VerticalAlignment="Center" - IsChecked="{x:Bind IsFullscreenEnabled, Mode=TwoWay}"/> - <CheckBox x:Name="GameResolutionFullscreenExclusive" Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ExclusiveFullscreen}" - HorizontalAlignment="Left" VerticalAlignment="Center" - IsEnabled="{x:Bind IsCanExclusiveFullscreen, Mode=OneWay}" - IsChecked="{x:Bind IsExclusiveFullscreenEnabled, Mode=TwoWay}"/> - <CheckBox x:Name="GameResolutionBorderless" Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Borderless}" - HorizontalAlignment="Left" VerticalAlignment="Center" - IsChecked="{x:Bind IsBorderlessEnabled, Mode=TwoWay}"/> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="Auto"/> - <ColumnDefinition Width="Auto"/> - </Grid.ColumnDefinitions> - <CheckBox x:Name="GameWindowResizable" Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResizableWindow}" - HorizontalAlignment="Left" VerticalAlignment="Center" - IsEnabled="{x:Bind IsCanResizableWindow, Mode=OneWay}" - IsChecked="{x:Bind IsResizableWindow, Mode=TwoWay}"/> - <Button Grid.Column="1" Margin="8,-4,0,0" Style="{ThemeResource ButtonRevealStyle}"> - <Button.Content> - <FontIcon - FontFamily="{ThemeResource FontAwesome}" - FontSize="12" - Glyph="?" /> - </Button.Content> - <Button.Flyout> - <Flyout AllowFocusOnInteraction="True"> - <TextBlock - Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResizableWindowTooltip}" - MaxWidth="360" - TextWrapping="Wrap" - TextAlignment="Center" - FontWeight="SemiBold"/> - </Flyout> - </Button.Flyout> - </Button> - </Grid> - </StackPanel> - <StackPanel Orientation="Horizontal" Margin="0,0,0,16"> - <ComboBox CornerRadius="14" x:Name="GameResolutionSelector" - PlaceholderText="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResSelectPlaceholder}" Width="128" - IsEnabled="{x:Bind IsCustomResolutionEnabled, Mode=OneWay, Converter={StaticResource BooleanInverse}}" - SelectedItem="{x:Bind ResolutionSelected, Mode=TwoWay}"/> - <CheckBox x:Name="GameCustomResolutionCheckbox" Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResCustom}" - VerticalAlignment="Center" Margin="16,0,0,0" - IsEnabled="{x:Bind IsExclusiveFullscreenEnabled, Mode=OneWay, Converter={StaticResource BooleanInverse}}" - IsChecked="{x:Bind IsCustomResolutionEnabled, Mode=TwoWay}"/> - </StackPanel> - </StackPanel> - <StackPanel x:Name="GameCustomResolutionPanel" Orientation="Horizontal"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResCustomW}" VerticalAlignment="Center" Margin="0,0,8,0"/> - <NumberBox CornerRadius="8,8,0,0" x:Name="GameCustomResolutionWidth" Value="{x:Bind ResolutionW, Mode=TwoWay}" - IsEnabled="{x:Bind IsCanResolutionWH, Mode=OneWay}" - HorizontalAlignment="Left" Width="100"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResCustomH}" VerticalAlignment="Center" Margin="16,0,8,0"/> - <NumberBox CornerRadius="8,8,0,0" x:Name="GameCustomResolutionHeight" Value="{x:Bind ResolutionH, Mode=TwoWay}" - IsEnabled="{x:Bind IsCanResolutionWH, Mode=OneWay}" - HorizontalAlignment="Left" Width="100"/> - </StackPanel> - </StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FPSPanel}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,8"/> - <StackPanel x:Name="GameMaxFPSPanel" Margin="0,8" Orientation="Horizontal"> - <StackPanel x:Name="GameMaxFPSInCombatPanel" Orientation="Vertical"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FPSInCombat}" VerticalAlignment="Center" Margin="0,0,0,8"/> - <StackPanel Orientation="Horizontal"> - <NumberBox CornerRadius="8,8,0,0" x:Name="GameMaxFPSInCombatValue" - Value="{x:Bind FPSInCombat, Mode=TwoWay}" Maximum="1024" HorizontalAlignment="Left" - Width="64" IsEnabled="True"/> - <TextBlock Text="FPS" VerticalAlignment="Center" Margin="8,0,8,0"/> - </StackPanel> - </StackPanel> - <StackPanel x:Name="GameMaxFPSInMainMenuPanel" Orientation="Vertical" Margin="16,0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FPSInMenu}" VerticalAlignment="Center" Margin="0,0,0,8"/> - <StackPanel Orientation="Horizontal"> - <NumberBox CornerRadius="8,8,0,0" x:Name="GameMaxFPSInMainMenuValue" - Value="{x:Bind FPSInMainMenu, Mode=TwoWay}" Maximum="1024" HorizontalAlignment="Left" - Width="64" IsEnabled="True"/> - <TextBlock Text="FPS" VerticalAlignment="Center" Margin="8,0,8,0"/> - </StackPanel> - </StackPanel> - </StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APIPanel}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,16"/> - <StackPanel x:Name="GraphicsAPIPanel" Orientation="Horizontal"> - <ComboBox x:Name="GraphicsAPISelector" SelectedIndex="{x:Bind GraphicsAPI, Mode=TwoWay}" PlaceholderText="Select" Width="224" CornerRadius="14"> - <ComboBoxItem Content="DirectX 11 (FL 10.1)"/> - <ComboBoxItem Content="DirectX 11 (FL 11.0) No ST"/> - <ComboBoxItem Content="DirectX 11 (FL 11.1)"/> - <ComboBoxItem Content="DirectX 11 (FL 11.1) No ST"/> - <ComboBoxItem Content="DirectX 12 [EXPERIMENTAL]"/> - </ComboBox> - <Button Margin="16,0"> - <Button.Content> - <FontIcon FontFamily="{ThemeResource FontAwesome}" Glyph="?" FontSize="12"/> - </Button.Content> - <Button.Flyout> - <Flyout> - <StackPanel Width="318"> - <TextBlock Style="{ThemeResource BaseTextBlockStyle}"> - <Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APIHelp1}"/> - <LineBreak/><LineBreak/> - <Run Text="- DirectX 11 level 10.1"/><LineBreak/> - <Run Text="- DirectX 11 level 11.0 No Single-Thread (Default)"/><LineBreak/> - <Run Text="- DirectX 11 level 11.1"/><LineBreak/> - <Run Text="- DirectX 11 level 11.1 No Single-Thread"/><LineBreak/> - <Run Text="- DirectX 12 (Experimental)"/><LineBreak/> - </TextBlock> - <TextBlock Style="{ThemeResource BaseTextBlockStyle}"> - <Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APIHelp2}"/> - <Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APIHelp3}"/> - </TextBlock> - </StackPanel> - </Flyout> - </Button.Flyout> - </Button> - </StackPanel> - <StackPanel x:Name="GameBoostPanel" Orientation="Horizontal"> - <ToggleSwitch Header="{x:Bind helper:Locale.Lang._GameSettingsPage.GameBoost}" OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" IsOn="{x:Bind IsGameBoost, Mode=TwoWay}" Margin="4,12,0,8"/> - </StackPanel> - </StackPanel> - <StackPanel x:Name="GameGraphicsPanel" Margin="0,16" Grid.Column="1"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_SpecPanel}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,0,0,16"/> - <StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Preset}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="GameGraphicsPresetSelector" Margin="0,0,0,16" CornerRadius="14" - ItemsSource="{x:Bind PresetRenderingNames}" SelectedIndex="{x:Bind PresetRenderingIndex, Mode=TwoWay}"/> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Render}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="RenderingAccuracySelector" Margin="0,0,0,8" Width="128" - SelectedIndex="{x:Bind GraphicsRenderingAccuracy, Mode=TwoWay}" CornerRadius="14"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecHigh}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecVeryHigh}"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="1"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Shadow}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="ShadowQualitySelector" Margin="0,0,0,8" Width="128" - SelectedIndex="{x:Bind GraphicsShadowQuality, Mode=TwoWay}" CornerRadius="14"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecDisabled}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecHigh}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecVeryHigh}"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="2"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Reflection}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="ReflectionQualitySelector" Margin="0,0,0,8" Width="128" - SelectedIndex="{x:Bind GraphicsReflectionQuality, Mode=TwoWay}" CornerRadius="14"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecDisabled}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecHigh}"/> - </ComboBox> - </StackPanel> - </Grid> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FX}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,8,0,8"/> - <Expander Margin="0,0,0,8" MaxWidth="514" HorizontalContentAlignment="Stretch" CornerRadius="8" - x:Name="GameFXPostProcExpander" IsExpanded="{x:Bind IsGraphicsPostFXEnabled, Mode=OneWay}"> - <Expander.Header> - <StackPanel Orientation="Horizontal"> - <CheckBox x:Name="GameFXPostProcCheckBox" - IsChecked="{x:Bind IsGraphicsPostFXEnabled, Mode=TwoWay}"> - <CheckBox.Content> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FXPost}" Style="{ThemeResource BodyStrongTextBlockStyle}"/> - </CheckBox.Content> - </CheckBox> - <CheckBox x:Name="GameFXPhysicsCheckBox" - IsChecked="{x:Bind IsGraphicsPhysicsEnabled, Mode=TwoWay}" Margin="12, 0, 0, 0"> - <CheckBox.Content> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FXPhysics}" Style="{ThemeResource BodyStrongTextBlockStyle}"/> - </CheckBox.Content> - </CheckBox> - </StackPanel> - </Expander.Header> - <Expander.Content> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition MinWidth="100"/> - <ColumnDefinition MinWidth="100"/> - <ColumnDefinition MinWidth="100"/> - <ColumnDefinition MinWidth="100"/> - </Grid.ColumnDefinitions> - <CheckBox x:Name="GameFXHDRCheckBox" Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FXHDR}" - IsChecked="{x:Bind IsGraphicsFXHDREnabled, Mode=TwoWay}" - IsEnabled="{x:Bind IsGraphicsPostFXEnabled, Mode=OneWay}" Grid.Column="0" MinWidth="0" Margin="8,0,0,0"/> - <CheckBox x:Name="GameFXHighQualityCheckBox" Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FXHQ}" - IsChecked="{x:Bind IsGraphicsFXHighQualityEnabled, Mode=TwoWay}" - IsEnabled="{x:Bind IsGraphicsPostFXEnabled, Mode=OneWay}" Grid.Column="1" MinWidth="0" Margin="8,0,0,0"/> - <CheckBox x:Name="GameFXFXAACheckBox" Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FXAA}" - IsChecked="{x:Bind IsGraphicsFXFXAAEnabled, Mode=TwoWay}" - IsEnabled="{x:Bind IsGraphicsPostFXEnabled, Mode=OneWay}" Grid.Column="2" HorizontalAlignment="Center" MinWidth="0" Margin="8,0,0,0"/> - <CheckBox x:Name="GameFXDistortionCheckBox" Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FXDistort}" - IsChecked="{x:Bind IsGraphicsFXDistortionEnabled, Mode=TwoWay}" - IsEnabled="{x:Bind IsGraphicsPostFXEnabled, Mode=OneWay}" Grid.Column="3" HorizontalAlignment="Right" MinWidth="0" Margin="8,0,0,0"/> - </Grid> - </Expander.Content> - </Expander> - </StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APHO2Panel}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,8,0,16"/> - <StackPanel> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APHO2GI}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="GlobalIlluminationSelector" Width="128" CornerRadius="14" - SelectedIndex="{x:Bind GraphicsGlobalIllumination, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecHigh}"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="1"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APHO2AO}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="AmbientOcclusionSelector" Width="128" CornerRadius="14" - SelectedIndex="{x:Bind GraphicsAmbientOcclusion, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecDisabled}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecHigh}"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="2"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APHO2LOD}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="LevelOfDetailSelector" Width="128" CornerRadius="14" - SelectedIndex="{x:Bind GraphicsLevelOfDetail, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecHigh}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecLow}"/> - </ComboBox> - </StackPanel> - </Grid> - <Grid Margin="0,16,0,0"> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APHO2VL}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="GameVolumetricLightSelector" Width="128" CornerRadius="14" - SelectedIndex="{x:Bind GraphicsVolumetricLight, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecHigh}"/> - </ComboBox> - </StackPanel> - </Grid> - </StackPanel> - </StackPanel> - </Grid> - <MenuFlyoutSeparator Margin="0,4,0,8"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_Title}" Style="{ThemeResource TitleLargeTextBlockStyle}" Margin="0,0,0,8"/> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0"> - <StackPanel x:Name="AudioSettingsPanelLeft" Margin="0,8,64,16"> - <StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_Master}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,0,0,8"/> - <StackPanel Orientation="Vertical" Margin="0,0,32,8"> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="40px"/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" VerticalAlignment="Center" Text="{Binding Value, ElementName=AudioMasterVolumeSlider}"/> - <Slider x:Name="AudioMasterVolumeSlider" Grid.Column="1" TickFrequency="1" Maximum="100" TickPlacement="Outside" - Value="{x:Bind AudioMasterVolume, Mode=TwoWay}"/> - </Grid> - </StackPanel> - </StackPanel> - <StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_BGM}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,16,0,8"/> - <StackPanel Orientation="Vertical" Margin="0,0,32,8"> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="40px"/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" VerticalAlignment="Center" Text="{Binding Value, ElementName=AudioBGMVolumeSlider}"/> - <Slider x:Name="AudioBGMVolumeSlider" Grid.Column="1" TickFrequency="1" Maximum="100" TickPlacement="Outside" - Value="{x:Bind AudioBGMVolume, Mode=TwoWay}"/> - </Grid> - </StackPanel> - </StackPanel> - <StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_SFX}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,16,0,8"/> - <StackPanel Orientation="Vertical" Margin="0,0,32,8"> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="40px"/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" VerticalAlignment="Center" Text="{Binding Value, ElementName=AudioSFXVolumeSlider}"/> - <Slider x:Name="AudioSFXVolumeSlider" Grid.Column="1" TickFrequency="1" Maximum="100" TickPlacement="Outside" - Value="{x:Bind AudioSFXVolume, Mode=TwoWay}"/> - </Grid> - </StackPanel> - </StackPanel> - <StackPanel> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_VOLang}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,8,0,8"/> - <ComboBox x:Name="AudioCVLanguageSelector" Width="172" CornerRadius="14" - SelectedIndex="{x:Bind AudioVoiceLanguage, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_VOLang1}"/> - <ComboBoxItem> - <TextBlock><Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_VOLang2}"/><Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_VODefault}" FontWeight="Bold"/></TextBlock> - </ComboBoxItem> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="1" HorizontalAlignment="Center"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_Mute}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,8,0,4"/> - <ToggleSwitch OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" IsOn="{x:Bind AudioMute, Mode=TwoWay}"/> - </StackPanel> - </Grid> - </StackPanel> - </StackPanel> - </StackPanel> - <StackPanel Grid.Column="1"> - <StackPanel x:Name="AudioSettingsPanelRight" Margin="0,8,64,16"> - <StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_VO}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,0,0,8"/> - <StackPanel Orientation="Vertical" Margin="0,0,32,8"> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="40px"/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" VerticalAlignment="Center" Text="{Binding Value, ElementName=AudioCVVolumeSlider}"/> - <Slider x:Name="AudioCVVolumeSlider" Grid.Column="1" TickFrequency="1" Maximum="100" TickPlacement="Outside" - Value="{x:Bind AudioVoiceVolume, Mode=TwoWay}"/> - </Grid> - </StackPanel> - </StackPanel> - <StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_Elf}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,16,0,8"/> - <StackPanel Orientation="Vertical" Margin="0,0,32,8"> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="40px"/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" VerticalAlignment="Center" Text="{Binding Value, ElementName=AudioElfCVVolumeSlider}"/> - <Slider x:Name="AudioElfCVVolumeSlider" Grid.Column="1" TickFrequency="1" Maximum="100" TickPlacement="Outside" - Value="{x:Bind AudioElfVolume, Mode=TwoWay}"/> - </Grid> - </StackPanel> - </StackPanel> - <StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_Cutscenes}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,16,0,8"/> - <StackPanel Orientation="Vertical" Margin="0,0,32,8"> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="40px"/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" VerticalAlignment="Center" Text="{Binding Value, ElementName=AudioCutscenesVolumeSlider}"/> - <Slider x:Name="AudioCutscenesVolumeSlider" Grid.Column="1" TickFrequency="1" Maximum="100" TickPlacement="Outside" - Value="{x:Bind AudioCutsceneVolume, Mode=TwoWay}"/> - </Grid> - </StackPanel> - </StackPanel> - </StackPanel> - </StackPanel> - </Grid> - <MenuFlyoutSeparator Margin="0,4,0,8"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.CustomArgs_Title}" Style="{ThemeResource TitleLargeTextBlockStyle}" Margin="0,0,0,16"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.CustomArgs_Subtitle}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,0,0,0"/> - <ToggleSwitch OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" Margin="0,0,0,16" IsOn="{x:Bind IsUseCustomArgs, Mode=TwoWay}"/> - <TextBox x:Name="CustomArgsTextBox" Text="{x:Bind CustomArgsValue, Mode=TwoWay}" CornerRadius="8,8,0,0" - HorizontalAlignment="Stretch" Margin="0,0,0,16"/> - <TextBlock> - <Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.CustomArgs_Footer1}"/> - <Hyperlink NavigateUri="https://docs.unity3d.com/Manual/PlayerCommandLineArguments.html" UnderlineStyle="None"><Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.CustomArgs_Footer2}" FontWeight="Bold"/></Hyperlink> - <Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.CustomArgs_Footer3}"/> - </TextBlock> - </StackPanel> - </ScrollViewer> - <Grid x:Name="GameSettingsApplyGrid" VerticalAlignment="Bottom" Background="{ThemeResource GameSettingsApplyGridBrush}" - HorizontalAlignment="Stretch" CornerRadius="8" Margin="16" Padding="16,16" - Shadow="{ThemeResource SharedShadow}"> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="Auto"/> - <ColumnDefinition/> - <ColumnDefinition Width="Auto"/> - </Grid.ColumnDefinitions> - <Button x:Name="ApplyButton" HorizontalAlignment="Left" Style="{ThemeResource AccentButtonStyle}" CornerRadius="16" - VerticalAlignment="Center" IsEnabled="True" Click="ApplyButton_Click" Shadow="{ThemeResource SharedShadow}"> - <StackPanel Orientation="Horizontal" Margin="8,0"> - <FontIcon FontFamily="{ThemeResource FontAwesomeSolid}" Glyph="" FontSize="14"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.ApplyBtn}" Margin="8,0,0,0" FontWeight="Medium"/> - </StackPanel> - </Button> - <TextBlock Grid.Column="1" x:Name="ApplyText" Text="{x:Bind helper:Locale.Lang._GameSettingsPage.SettingsApplied}" Style="{ThemeResource BodyStrongTextBlockStyle}" VerticalAlignment="Center" Margin="16,-4,0,0" HorizontalAlignment="Stretch" TextWrapping="Wrap" Visibility="Collapsed"/> - <StackPanel Grid.Column="2" HorizontalAlignment="Right" Orientation="Horizontal"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportExport}" Margin="16,-4,16,0" VerticalAlignment="Center" FontWeight="Medium"/> - <Button x:Name="RegistryExport" CornerRadius="16,0,0,16" Height="32" - Shadow="{ThemeResource SharedShadow}" - Style="{ThemeResource AccentButtonStyle}" - Click="RegistryExportClick" - ToolTipService.ToolTip="{x:Bind helper:Locale.Lang._GameSettingsPage.RegExportTooltip}"> - <StackPanel Orientation="Horizontal" Margin="8,0"> - <FontIcon FontFamily="{ThemeResource FontAwesomeSolid}" Glyph="" FontSize="14"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegExportTitle}" Margin="8,0,0,0" FontWeight="Medium"/> - </StackPanel> - </Button> - <Button x:Name="RegistryImport" CornerRadius="0,16,16,0" Height="32" - Shadow="{ThemeResource SharedShadow}" - Style="{ThemeResource AccentButtonStyle}" - Click="RegistryImportClick" - ToolTipService.ToolTip="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportTooltip}"> - <StackPanel Orientation="Horizontal" Margin="8,0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportTitle}" Margin="0,0,8,0" FontWeight="Medium"/> - <FontIcon FontFamily="{ThemeResource FontAwesomeSolid}" Glyph="" FontSize="14"/> - </StackPanel> - </Button> - </StackPanel> - </Grid> - </Grid> - <Grid x:Name="Overlay" Visibility="Collapsed"> - <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Vertical" Margin="0,176,0,0"> - <ProgressRing x:Name="Ring" IsActive="True" IsIndeterminate="false" Width="48" Height="48" Margin="32" Value="100" Maximum="100"/> - <TextBlock x:Name="OverlayTitle" Text="Title" Style="{ThemeResource SubtitleTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/> - <TextBlock x:Name="OverlaySubtitle" Text="Subtitle" Style="{ThemeResource BodyStrongTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,8,0,192"/> - </StackPanel> - </Grid> - </Grid> -</Page> diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/GenshinGameSettingsPage.Ext.cs b/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/GenshinGameSettingsPage.Ext.cs similarity index 82% rename from CollapseLauncher/XAMLs/MainApp/Pages/GenshinGameSettingsPage.Ext.cs rename to CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/GenshinGameSettingsPage.Ext.cs index c0d08ba05..ec4b13b11 100644 --- a/CollapseLauncher/XAMLs/MainApp/Pages/GenshinGameSettingsPage.Ext.cs +++ b/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/GenshinGameSettingsPage.Ext.cs @@ -1,13 +1,25 @@ using CollapseLauncher.GameSettings.Genshin; using CollapseLauncher.GameSettings.Genshin.Enums; +using Microsoft.UI.Xaml.Controls; using System; +using System.ComponentModel; using System.Drawing; +using System.Runtime.CompilerServices; using static Hi3Helper.Shared.Region.LauncherConfig; namespace CollapseLauncher.Pages { - public partial class GenshinGameSettingsPage + public partial class GenshinGameSettingsPage : Page, INotifyPropertyChanged { + #region Methods + public event PropertyChangedEventHandler PropertyChanged = delegate { }; + private void OnPropertyChanged([CallerMemberName] string propertyName = null) + { + // Raise the PropertyChanged event, passing the name of the property whose value has changed. + this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + #endregion + #region GameResolution public bool IsFullscreenEnabled { @@ -484,5 +496,98 @@ public bool IsGameBoost set => Settings.SettingsCollapseMisc.UseGameBoost = value; } #endregion + + #region Advanced Settings + public bool IsUseAdvancedSettings + { + get + { + bool value = Settings.SettingsCollapseMisc.UseAdvancedGameSettings; + if (value){AdvancedSettingsPanel.Visibility = Microsoft.UI.Xaml.Visibility.Visible;} + else AdvancedSettingsPanel.Visibility = Microsoft.UI.Xaml.Visibility.Collapsed; + return value; + } + set + { + Settings.SettingsCollapseMisc.UseAdvancedGameSettings = value; + if (value) AdvancedSettingsPanel.Visibility = Microsoft.UI.Xaml.Visibility.Visible; + else AdvancedSettingsPanel.Visibility = Microsoft.UI.Xaml.Visibility.Collapsed; + } + } + + public bool IsUsePreLaunchCommand + { + get + { + bool value = Settings.SettingsCollapseMisc.UseGamePreLaunchCommand; + + if (value) + { + PreLaunchCommandTextBox.IsEnabled = true; + PreLaunchForceCloseToggle.IsEnabled = true; + } + else + { + PreLaunchCommandTextBox.IsEnabled = false; + PreLaunchForceCloseToggle.IsEnabled = false; + } + + return value; + } + set + { + if (value) + { + PreLaunchCommandTextBox.IsEnabled = true; + PreLaunchForceCloseToggle.IsEnabled = true; + } + else + { + PreLaunchCommandTextBox.IsEnabled = false; + PreLaunchForceCloseToggle.IsEnabled = false; + } + + Settings.SettingsCollapseMisc.UseGamePreLaunchCommand = value; + } + } + + public string PreLaunchCommand + { + get => Settings.SettingsCollapseMisc.GamePreLaunchCommand; + set => Settings.SettingsCollapseMisc.GamePreLaunchCommand = value; + } + + public bool IsPreLaunchCommandExitOnGameClose + { + get => Settings.SettingsCollapseMisc.GamePreLaunchExitOnGameStop; + set => Settings.SettingsCollapseMisc.GamePreLaunchExitOnGameStop = value; + } + + public bool IsUsePostExitCommand + { + get + { + bool value = Settings.SettingsCollapseMisc.UseGamePostExitCommand; + + if (value) PostExitCommandTextBox.IsEnabled = true; + else PostExitCommandTextBox.IsEnabled = false; + + return value; + } + set + { + if (value) PostExitCommandTextBox.IsEnabled = true; + else PostExitCommandTextBox.IsEnabled = false; + + Settings.SettingsCollapseMisc.UseGamePostExitCommand = value; + } + } + + public string PostExitCommand + { + get => Settings.SettingsCollapseMisc.GamePostExitCommand; + set => Settings.SettingsCollapseMisc.GamePostExitCommand = value; + } + #endregion } } diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/GenshinGameSettingsPage.xaml b/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/GenshinGameSettingsPage.xaml new file mode 100644 index 000000000..3f2dd13e5 --- /dev/null +++ b/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/GenshinGameSettingsPage.xaml @@ -0,0 +1,1199 @@ +<?xml version="1.0" encoding="utf-8" ?> +<Page + x:Class="CollapseLauncher.Pages.GenshinGameSettingsPage" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:controls="using:CommunityToolkit.WinUI.Controls" + xmlns:conv="using:CollapseLauncher.Pages" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:f="using:Windows.Globalization.NumberFormatting" + xmlns:helper="using:Hi3Helper" + xmlns:local="using:CollapseLauncher" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:settype="using:CollapseLauncher.GameSettings" + xmlns:static="using:CollapseLauncher.GameSettings.Genshin" + xmlns:xaml="using:Microsoft.Graphics.Canvas.UI.Xaml" + Loaded="InitializeSettings" + Unloaded="OnUnload" + mc:Ignorable="d"> + <Page.Resources> + <ThemeShadow x:Name="SharedShadow" /> + <conv:InverseBooleanConverter x:Key="BooleanInverse" /> + <f:DecimalFormatter x:Key="DecimalFormatter" SignificantDigits="5" /> + <conv:BooleanVisibilityConverter x:Key="BooleanVisibilityConverter" /> + <conv:InverseBooleanVisibilityConverter x:Key="InverseBooleanVisibilityConverter" /> + </Page.Resources> + <Grid> + <Grid x:Name="PageContent"> + <ScrollViewer VerticalScrollBarVisibility="Auto"> + <StackPanel Margin="32,40,32,32" Padding="0,0,0,74"> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource TitleLargeTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_Title}" /> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0"> + <StackPanel x:Name="GameResolutionPanel" Margin="0,0"> + <StackPanel> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ResolutionPanel}" /> + <StackPanel + x:Name="GameResolutionWindow" + Margin="0,0,0,8" + Orientation="Vertical"> + <CheckBox + x:Name="VSyncToggle" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_VSync}" + IsChecked="{x:Bind VerticalSync, Mode=TwoWay}" /> + <CheckBox + x:Name="GameResolutionFullscreen" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_Fullscreen}" + IsChecked="{x:Bind IsFullscreenEnabled, Mode=TwoWay}" /> + <CheckBox + x:Name="GameResolutionBorderless" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Borderless}" + IsChecked="{x:Bind IsBorderlessEnabled, Mode=TwoWay}" /> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + </Grid.ColumnDefinitions> + <CheckBox + x:Name="GameWindowResizable" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResizableWindow}" + IsChecked="{x:Bind IsResizableWindow, Mode=TwoWay}" + IsEnabled="{x:Bind IsCanResizableWindow, Mode=OneWay}" /> + <Button + Grid.Column="1" + Margin="8,-4,0,0" + Style="{ThemeResource ButtonRevealStyle}"> + <Button.Content> + <FontIcon + FontFamily="{ThemeResource FontAwesome}" + FontSize="12" + Glyph="?" /> + </Button.Content> + <Button.Flyout> + <Flyout AllowFocusOnInteraction="True"> + <TextBlock + MaxWidth="360" + FontWeight="SemiBold" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResizableWindowTooltip}" + TextAlignment="Center" + TextWrapping="Wrap" /> + </Flyout> + </Button.Flyout> + </Button> + </Grid> + <!-- + Exclusive Fullscreen option is disabled for Genshin due to the amount of bugs it caused + Ref: https://www.pcgamingwiki.com/wiki/Genshin_Impact#G-Sync_.2F_Variable_Refresh_Rate_Does_Not_Work + Delete `Visibility="Collapsed"' to revert this change + --> + <TextBlock + Margin="28,0,0,0" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ExclusiveFullscreen_Help}" + Visibility="Collapsed" /> + <CheckBox + x:Name="GameResolutionFullscreenExclusive" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ExclusiveFullscreen}" + IsChecked="{x:Bind IsExclusiveFullscreenEnabled, Mode=TwoWay}" + IsEnabled="{x:Bind IsCanExclusiveFullscreen, Mode=OneWay}" + Visibility="Collapsed" /> + </StackPanel> + <StackPanel Margin="0,0,0,16" Orientation="Horizontal"> + <ComboBox + x:Name="GameResolutionSelector" + Width="128" + CornerRadius="14" + IsEnabled="{x:Bind IsCustomResolutionEnabled, Mode=OneWay, Converter={StaticResource BooleanInverse}}" + PlaceholderText="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ResSelectPlaceholder}" + SelectedItem="{x:Bind ResolutionSelected, Mode=TwoWay}" /> + <CheckBox + x:Name="GameCustomResolutionCheckbox" + Margin="16,0,0,0" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ResCustom}" + IsChecked="{x:Bind IsCustomResolutionEnabled, Mode=TwoWay}" + IsEnabled="{x:Bind IsExclusiveFullscreenEnabled, Mode=OneWay, Converter={StaticResource BooleanInverse}}" /> + </StackPanel> + </StackPanel> + <StackPanel x:Name="GameCustomResolutionPanel" Orientation="Horizontal"> + <TextBlock + Margin="0,0,8,0" + VerticalAlignment="Center" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ResCustomW}" /> + <NumberBox + x:Name="GameCustomResolutionWidth" + Width="100" + HorizontalAlignment="Left" + CornerRadius="8,8,0,0" + IsEnabled="{x:Bind IsCanResolutionWH, Mode=OneWay}" + Value="{x:Bind ResolutionW, Mode=TwoWay}" /> + <TextBlock + Margin="16,0,8,0" + VerticalAlignment="Center" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ResCustomH}" /> + <NumberBox + x:Name="GameCustomResolutionHeight" + Width="100" + HorizontalAlignment="Left" + CornerRadius="8,8,0,0" + IsEnabled="{x:Bind IsCanResolutionWH, Mode=OneWay}" + Value="{x:Bind ResolutionH, Mode=TwoWay}" /> + </StackPanel> + <TextBlock + Margin="0,16,8,0" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_FPS}" /> + <ComboBox + x:Name="FPSSelector" + Width="128" + Margin="0,8,0,8" + CornerRadius="14" + ItemsSource="{x:Bind static:GlobalPerfData.FPSIndex}" + SelectedIndex="{x:Bind FPS, Mode=TwoWay}" /> + </StackPanel> + <StackPanel x:Name="GameBoostPanel" Orientation="Horizontal"> + <ToggleSwitch + Margin="4,8,0,0" + Header="{x:Bind helper:Locale.Lang._GameSettingsPage.GameBoost}" + IsOn="{x:Bind IsGameBoost, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + </StackPanel> + <StackPanel x:Name="HDRSettings" Orientation="Vertical"> + <TextBlock + Margin="0,8,8,8" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR}" /> + <Expander + x:Name="HDRExpander" + MinWidth="400" + MaxWidth="700" + Margin="0,0,0,8" + HorizontalContentAlignment="Stretch" + CornerRadius="8" + Expanding="HDRExpander_OnExpanding"> + <Expander.Header> + <Grid> + <CheckBox + x:Name="HDRCheckBox" + IsChecked="{x:Bind IsHDR, Mode=TwoWay}" + IsEnabled="{x:Bind IsHDREnabled}"> + <CheckBox.Content> + <TextBlock Style="{ThemeResource BodyStrongTextBlockStyle}" Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_Enable}" /> + </CheckBox.Content> + </CheckBox> + <Button + Width="30" + Height="30" + Padding="0" + HorizontalAlignment="Right" + CornerRadius="4"> + <Button.Content> + <FontIcon + HorizontalAlignment="Center" + FontFamily="{ThemeResource FontAwesome}" + FontSize="10" + Glyph="?" /> + </Button.Content> + <Button.Flyout> + <Flyout> + <StackPanel> + <StackPanel Visibility="{x:Bind IsHDREnabled, Converter={StaticResource InverseBooleanVisibilityConverter}}"> + <TextBlock Style="{ThemeResource BaseTextBlockStyle}" Visibility="{x:Bind IsHDRSupported, Converter={StaticResource InverseBooleanVisibilityConverter}}"> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_NotSupported1}" /><LineBreak /> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_NotSupported2}" /><LineBreak /> + </TextBlock> + <TextBlock Style="{ThemeResource BaseTextBlockStyle}" Visibility="{x:Bind IsHDRSupported, Converter={StaticResource BooleanVisibilityConverter}}"> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_NotEnabled1}" /><LineBreak /> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_NotEnabled2}" /><LineBreak /> + </TextBlock> + <TextBlock> + <Hyperlink NavigateUri="https://support.microsoft.com/windows/2d767185-38ec-7fdc-6f97-bbc6c5ef24e6"> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_Help_Link}" /> + </Hyperlink> + </TextBlock> + </StackPanel> + <StackPanel Visibility="{x:Bind IsHDREnabled, Converter={StaticResource BooleanVisibilityConverter}}"> + <RichTextBlock + IsTextSelectionEnabled="False" + Style="{ThemeResource BodyRichTextBlockStyle}" + TextAlignment="Left"> + <Paragraph FontWeight="SemiBold"> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_MaxLuminosity}" /> + </Paragraph> + <Paragraph FontSize="13"> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_MaxLuminosity_Help}" /><LineBreak /> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_Calibration_Help}" /> + </Paragraph> + <Paragraph FontSize="2" /> + <Paragraph FontWeight="SemiBold"> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_UiBrightness}" /> + </Paragraph> + <Paragraph FontSize="13"> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_UiBrightness_Help}" /> + </Paragraph> + <Paragraph FontSize="2" /> + <Paragraph FontWeight="SemiBold"> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_SceneBrightness}" /> + </Paragraph> + <Paragraph FontSize="13"> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_SceneBrightness_Help}" /> + </Paragraph> + </RichTextBlock> + </StackPanel> + </StackPanel> + </Flyout> + </Button.Flyout> + </Button> + </Grid> + </Expander.Header> + <Expander.Content> + <StackPanel Padding="10"> + <xaml:CanvasSwapChainPanel + x:Name="HDRCalibrationPanel1" + Width="360" + Height="203" + Margin="0,0,0,8" + Loaded="SwapChainPanel1_OnLoaded" /> + <Grid> + <TextBlock + VerticalAlignment="Center" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_MaxLuminosity}" /> + <NumberBox + x:Name="MaxLuminosityValue" + Margin="0,0,0,0" + HorizontalAlignment="Right" + CornerRadius="8,8,0,0" + Maximum="2000.0" + Minimum="300.0" + NumberFormatter="{StaticResource DecimalFormatter}" + ValueChanged="MaxLuminosityValue_ValueChanged" /> + </Grid> + <Slider + x:Name="MaxLuminositySlider" + MinWidth="350" + MaxWidth="514" + Margin="0,0,0,4" + HorizontalAlignment="Center" + IsThumbToolTipEnabled="False" + Maximum="2000.0" + Minimum="300.0" + StepFrequency="50" + TickFrequency="100" + TickPlacement="Outside" + ValueChanged="MaxLuminositySlider_ValueChanged" + Value="{x:Bind MaxLuminosity, Mode=TwoWay}" /> + <xaml:CanvasSwapChainPanel + x:Name="HDRCalibrationPanel2" + Width="360" + Height="203" + Margin="0,0,0,8" + Loaded="SwapChainPanel2_OnLoaded" /> + <Grid> + <TextBlock + VerticalAlignment="Center" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_SceneBrightness}" /> + <NumberBox + x:Name="ScenePaperWhiteValue" + Margin="0,0,0,0" + HorizontalAlignment="Right" + CornerRadius="8,8,0,0" + Maximum="500.0" + Minimum="100.0" + NumberFormatter="{StaticResource DecimalFormatter}" + ValueChanged="ScenePaperWhiteValue_ValueChanged" /> + </Grid> + <Slider + x:Name="ScenePaperWhiteSlider" + MinWidth="350" + HorizontalAlignment="Center" + IsThumbToolTipEnabled="False" + Maximum="500.0" + Minimum="100.0" + StepFrequency="5" + TickFrequency="25" + TickPlacement="Outside" + ValueChanged="ScenePaperWhiteSlider_ValueChanged" + Value="{x:Bind ScenePaperWhite, Mode=TwoWay}" /> + <Grid> + <TextBlock + VerticalAlignment="Center" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_UiBrightness}" /> + <NumberBox + x:Name="UiPaperWhiteValue" + Height="32" + Margin="0,0,0,0" + HorizontalAlignment="Right" + VerticalAlignment="Center" + CornerRadius="8,8,0,0" + Maximum="550.0" + Minimum="150.0" + NumberFormatter="{StaticResource DecimalFormatter}" + ValueChanged="UiPaperWhiteValue_ValueChanged" /> + </Grid> + <Slider + x:Name="UiPaperWhiteSlider" + MinWidth="350" + Margin="0,0,0,4" + HorizontalAlignment="Center" + IsThumbToolTipEnabled="False" + Maximum="550.0" + Minimum="150.0" + StepFrequency="5" + TickFrequency="25" + TickPlacement="Outside" + ValueChanged="UiPaperWhiteSlider_ValueChanged" + Value="{x:Bind UiPaperWhite, Mode=TwoWay}" /> + </StackPanel> + </Expander.Content> + </Expander> + </StackPanel> + </StackPanel> + <StackPanel + x:Name="GenshinGameGraphicsPanel" + Grid.Column="1" + Margin="0,0"> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_SpecPanel}" /> + <StackPanel> + <StackPanel> + <Grid x:Name="GammaGrid"> + <TextBlock Style="{ThemeResource BodyStrongTextBlockStyle}" Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_Gamma}" /> + <NumberBox + x:Name="GammaValue" + Width="110" + Margin="0,0,28,0" + HorizontalAlignment="Right" + CornerRadius="8,8,0,0" + Maximum="3.0" + Minimum="1.4" + NumberFormatter="{StaticResource DecimalFormatter}" + ValueChanged="GammaValue_ValueChanged" /> + </Grid> + <Slider + x:Name="GammaSlider" + Margin="0,0,28,8" + IsThumbToolTipEnabled="False" + Maximum="3.0" + Minimum="1.4" + StepFrequency="0.000001" + TickFrequency="0.2" + TickPlacement="Outside" + ValueChanged="GammaSlider_ValueChanged" + Value="{x:Bind Gamma, Mode=TwoWay}" /> + </StackPanel> + <StackPanel> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0"> + <TextBlock + Margin="0,0,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_RenderScale}" /> + <ComboBox + x:Name="RenderScaleSelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + ItemsSource="{x:Bind static:GlobalPerfData.RenderScaleValuesStr}" + SelectedIndex="{x:Bind RenderScale, Mode=TwoWay}" /> + </StackPanel> + <StackPanel Grid.Column="1"> + <TextBlock + Margin="0,0,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_AAMode}" /> + <ComboBox + x:Name="AntialiasingSelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind Antialiasing, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecDisabled}" /> + <ComboBoxItem Content="FSR 2" /> + <ComboBoxItem Content="SMAA" /> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="2"> + <TextBlock + Margin="0,0,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_AnisotropicFiltering}" /> + <ComboBox + x:Name="AnisotropicFilteringSelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind AnisotropicFiltering, Mode=TwoWay}"> + <ComboBoxItem Content="1x" /> + <ComboBoxItem Content="2x" /> + <ComboBoxItem Content="4x" /> + <ComboBoxItem Content="8x" /> + <ComboBoxItem Content="16x" /> + </ComboBox> + </StackPanel> + </Grid> + </StackPanel> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0"> + <TextBlock + Margin="0,8,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ShadowQuality}" /> + <ComboBox + x:Name="ShadowQualitySelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind ShadowQuality, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecVeryLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecHigh}" /> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="1"> + <TextBlock + Margin="0,8,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_VisualFX}" /> + <ComboBox + x:Name="VisualEffectsSelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind VisualEffects, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecVeryLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecHigh}" /> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="2"> + <TextBlock + Margin="0,8,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_SFXQuality}" /> + <ComboBox + x:Name="SFXQualitySelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind SFXQuality, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecVeryLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecHigh}" /> + </ComboBox> + </StackPanel> + </Grid> + </StackPanel> + <StackPanel> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0"> + <TextBlock + Margin="0,8,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_EnvDetailQuality}" /> + <ComboBox + x:Name="EnvironmentDetailSelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind EnvironmentDetail, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecVeryLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecHigh}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecVeryHigh}" /> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="1"> + <TextBlock + Margin="0,8,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_MotionBlur}" /> + <ComboBox + x:Name="MotionBlurSelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind MotionBlur, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecDisabled}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecHigh}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecExtreme}" /> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="2"> + <TextBlock + Margin="0,8,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_CrowdDensity}" /> + <ComboBox + x:Name="CrowdDensitySelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind CrowdDensity, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecHigh}" /> + </ComboBox> + </StackPanel> + </Grid> + </StackPanel> + <StackPanel> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0"> + <TextBlock + Margin="0,8,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_SubsurfaceScattering}" /> + <ComboBox + x:Name="SubsurfaceScatteringSelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind SubsurfaceScattering, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecDisabled}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecHigh}" /> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="1"> + <TextBlock + Margin="0,8,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_TeammateFX}" /> + <ComboBox + x:Name="CoOpTeammateEffectsSelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind CoOpTeammateEffects, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecDisabled}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecPartiallyOff}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecEnabled}" /> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="2"> + <TextBlock + Margin="0,8,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_GlobalIllumination}" /> + <StackPanel Orientation="Horizontal"> + <ComboBox + x:Name="GlobalIlluminationSelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind GlobalIllumination, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecDisabled}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecHigh}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecExtreme}" /> + </ComboBox> + <Button + Width="16" + Height="24" + Margin="4,-10,0,0" + Padding="0" + HorizontalAlignment="Center" + CornerRadius="4"> + <Button.Content> + <FontIcon + FontFamily="{ThemeResource FontAwesome}" + FontSize="10" + Glyph="?" /> + </Button.Content> + <Button.Flyout> + <Flyout> + <StackPanel> + <TextBlock Style="{ThemeResource BaseTextBlockStyle}" TextAlignment="Center"> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_GlobalIllumination_Help1}" /><LineBreak /> + <Hyperlink NavigateUri="https://genshin.hoyoverse.com/en/news/detail/112690#:~:text=Minimum%20Specifications%20for%20Global%20Illumination"> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_GlobalIllumination_Help2}" /> + </Hyperlink> + </TextBlock> + </StackPanel> + </Flyout> + </Button.Flyout> + </Button> + </StackPanel> + </StackPanel> + </Grid> + </StackPanel> + <StackPanel Margin="0,8,0,8"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0"> + <Grid> + <!-- + A workaround for the tooltip not appearing when the checkbox is disabled. + --> + <Border + x:Name="VolumetricFogTooltipEnforcer" + Background="Transparent" + ToolTipService.ToolTip="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_VolFogs_ToolTip}" + Visibility="{x:Bind VolumetricFogToggle.IsEnabled, Converter={StaticResource BooleanVisibilityConverter}}" /> + <CheckBox + x:Name="VolumetricFogToggle" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_VolFogs}" + IsChecked="{x:Bind VolumetricFog, Mode=TwoWay}" /> + </Grid> + </StackPanel> + <StackPanel Grid.Column="1" VerticalAlignment="Center"> + <CheckBox + x:Name="ReflectionsToggle" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ReflectionQuality}" + IsChecked="{x:Bind Reflections, Mode=TwoWay}" /> + </StackPanel> + <StackPanel Grid.Column="2" VerticalAlignment="Center"> + <CheckBox + x:Name="BloomToggle" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_BloomQuality}" + IsChecked="{x:Bind Bloom, Mode=TwoWay}" /> + </StackPanel> + </Grid> + </StackPanel> + <StackPanel Margin="0,0,0,8"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0" VerticalAlignment="Center"> + <CheckBox + x:Name="TeamPageBackgroundToggle" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_TeamPageBackground}" + IsChecked="{x:Bind TeamPageBackground, Mode=TwoWay}" /> + </StackPanel> + <StackPanel Grid.Column="1" VerticalAlignment="Center"> + <CheckBox + x:Name="DynamicCharacterResolutionToggle" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_DynamicCharacterResolution}" + IsChecked="{x:Bind DynamicCharacterResolution, Mode=TwoWay}" + ToolTipService.ToolTip="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_DynamicCharacterResolution_Tooltip}" /> + </StackPanel> + </Grid> + </StackPanel> + </StackPanel> + </Grid> + <MenuFlyoutSeparator Margin="0,4,0,8" /> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource TitleLargeTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Audio_Title}" /> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0"> + <StackPanel x:Name="AudioSettingsPanelLeft" Margin="0,16,64,16"> + <StackPanel> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Audio_Master}" /> + <StackPanel Margin="0,0,32,8" Orientation="Vertical"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="40px" /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <TextBlock + VerticalAlignment="Center" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{Binding Value, ElementName=AudioMasterVolumeSlider}" /> + <Slider + x:Name="AudioMasterVolumeSlider" + Grid.Column="1" + Maximum="10" + TickFrequency="1" + TickPlacement="Outside" + Value="{x:Bind Audio_Global, Mode=TwoWay}" /> + </Grid> + </StackPanel> + <TextBlock + Margin="0,16,0,16" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Audio_SFX}" /> + <StackPanel Margin="0,0,32,8" Orientation="Vertical"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="40px" /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <TextBlock + VerticalAlignment="Center" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{Binding Value, ElementName=AudioSFXVolumeSlider}" /> + <Slider + x:Name="AudioSFXVolumeSlider" + Grid.Column="1" + Maximum="10" + TickFrequency="1" + TickPlacement="Outside" + Value="{x:Bind Audio_SFX, Mode=TwoWay}" /> + </Grid> + </StackPanel> + </StackPanel> + </StackPanel> + </StackPanel> + <StackPanel Grid.Column="1"> + <StackPanel x:Name="AudioSettingsPanelRight" Margin="0,16,64,16"> + <StackPanel> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Audio_BGM}" /> + <StackPanel Margin="0,0,32,8" Orientation="Vertical"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="40px" /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <TextBlock + VerticalAlignment="Center" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{Binding Value, ElementName=AudioBGMVolumeSlider}" /> + <Slider + x:Name="AudioBGMVolumeSlider" + Grid.Column="1" + Maximum="10" + TickFrequency="1" + TickPlacement="Outside" + Value="{x:Bind Audio_Music, Mode=TwoWay}" /> + </Grid> + </StackPanel> + <TextBlock + Margin="0,16,0,16" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Audio_VO}" /> + <StackPanel Margin="0,0,32,8" Orientation="Vertical"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="40px" /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <TextBlock + VerticalAlignment="Center" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{Binding Value, ElementName=AudioVOVolumeSlider}" /> + <Slider + x:Name="AudioVOVolumeSlider" + Grid.Column="1" + Maximum="10" + TickFrequency="1" + TickPlacement="Outside" + Value="{x:Bind Audio_Voice, Mode=TwoWay}" /> + </Grid> + </StackPanel> + </StackPanel> + </StackPanel> + </StackPanel> + </Grid> + <StackPanel Margin="0,0,0,8"> + <controls:UniformGrid HorizontalAlignment="Left" Columns="3"> + <StackPanel Grid.Column="0"> + <CheckBox + x:Name="AudioDynamicRangeToggle" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Audio_DynamicRange}" + IsChecked="{x:Bind Audio_DynamicRange, Mode=TwoWay}" /> + </StackPanel> + <StackPanel Grid.Column="1"> + <CheckBox + x:Name="AudioSurroundToggle" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Audio_Output_Surround}" + IsChecked="{x:Bind Audio_Surround, Mode=TwoWay}" /> + </StackPanel> + <StackPanel Grid.Column="2"> + <CheckBox + x:Name="AudioMuteOnMinimizeToggle" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Audio_MuteOnMinimize}" + IsChecked="{x:Bind Audio_MuteOnMinimized, Mode=TwoWay}" /> + </StackPanel> + </controls:UniformGrid> + </StackPanel> + <MenuFlyoutSeparator Margin="0,4,0,8" /> + <StackPanel> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource TitleLargeTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Language}" /> + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="Auto" /> + <RowDefinition Height="*" /> + </Grid.RowDefinitions> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <TextBlock + Grid.Row="0" + Margin="0,0,0,16" + TextWrapping="Wrap"> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Language_Help1}" /> + <LineBreak /> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Language_Help2}" /> + </TextBlock> + <Grid Grid.Row="1"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="200" /> + <ColumnDefinition Width="200" /> + </Grid.ColumnDefinitions> + <StackPanel + x:Name="LangSettingLeft" + Grid.Column="0" + Margin="0,0,24,0"> + <TextBlock + Margin="0,0,0,8" + FontSize="16" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.LanguageAudio}" /> + <ComboBox + x:Name="AudioLangSelector" + Margin="-4,0,0,16" + HorizontalAlignment="Stretch" + CornerRadius="14" + SelectedIndex="{x:Bind AudioLang, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.VO_cn}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.VO_en}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.VO_jp}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.VO_kr}" /> + </ComboBox> + </StackPanel> + <StackPanel + x:Name="LangSettingRight" + Grid.Column="1" + Margin="0,0,24,0"> + <TextBlock + Margin="0,0,0,8" + FontSize="16" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.LanguageText}" /> + <ComboBox + x:Name="TextLangSelector" + Margin="-4,0,0,16" + HorizontalAlignment="Stretch" + CornerRadius="14" + MaxDropDownHeight="200" + SelectedIndex="{x:Bind TextLang, Mode=TwoWay}"> + <ComboBoxItem Content="English" /> + <ComboBoxItem Content="简体中文" /> + <ComboBoxItem Content="繁體中文" /> + <ComboBoxItem Content="Français" /> + <ComboBoxItem Content="Deutsch" /> + <ComboBoxItem Content="Español" /> + <ComboBoxItem Content="Português" /> + <ComboBoxItem Content="Русский" /> + <ComboBoxItem Content="日本語" /> + <ComboBoxItem Content="한국어" /> + <ComboBoxItem Content="ภาษาไทย" /> + <ComboBoxItem Content="Tiếng Việt" /> + <ComboBoxItem Content="Bahasa Indonesia" /> + <ComboBoxItem Content="Türkçe" /> + <ComboBoxItem Content="Italiano" /> + </ComboBox> + </StackPanel> + </Grid> + </Grid> + </StackPanel> + <MenuFlyoutSeparator Margin="0,4,0,8" /> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource TitleLargeTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.CustomArgs_Title}" /> + <TextBlock + Margin="0,0,0,0" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.CustomArgs_Subtitle}" /> + <ToggleSwitch + Margin="0,0,0,16" + IsOn="{x:Bind IsUseCustomArgs, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + <TextBox + x:Name="CustomArgsTextBox" + Margin="0,0,0,16" + HorizontalAlignment="Stretch" + CornerRadius="8,8,0,0" + Text="{x:Bind CustomArgsValue, Mode=TwoWay}" /> + <TextBlock TextWrapping="WrapWholeWords"> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.CustomArgs_Footer1}" /> + <Hyperlink NavigateUri="https://docs.unity3d.com/Manual/PlayerCommandLineArguments.html" UnderlineStyle="None"> + <Run FontWeight="Bold" Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.CustomArgs_Footer2}" /> + </Hyperlink> + <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.CustomArgs_Footer3}" /> + </TextBlock> + <MenuFlyoutSeparator Margin="0,16,0,16" /> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + </Grid.ColumnDefinitions> + <TextBlock + Grid.Column="0" + Margin="0,0,8,0" + VerticalAlignment="Stretch" + Style="{ThemeResource TitleLargeTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_Title}" /> + <ToggleSwitch + Grid.Column="1" + FontWeight="SemiBold" + FontSize="26" + VerticalAlignment="Stretch" + VerticalContentAlignment="Stretch" + Margin="8,12,0,8" + IsOn="{x:Bind IsUseAdvancedSettings, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + </Grid> + <StackPanel x:Name="AdvancedSettingsPanel" Visibility="Collapsed"> + <TextBlock Margin="0,0,0,8" TextWrapping="WrapWholeWords"> + <Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_Subtitle1}" /> + <Run FontWeight="Bold" Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_Subtitle2}" /> + <Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_Subtitle3}" /> + </TextBlock> + <TextBlock + Margin="0,0,8,8" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_PreLaunch_Title}" /> + <ToggleSwitch + Margin="0,0,0,0" + Header="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_PreLaunch_Subtitle}" + IsOn="{x:Bind IsUsePreLaunchCommand, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + <ToggleSwitch + x:Name="PreLaunchForceCloseToggle" + Margin="0,0,0,8" + Header="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_PreLaunch_Exit}" + IsOn="{x:Bind IsPreLaunchCommandExitOnGameClose, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + <TextBox + x:Name="PreLaunchCommandTextBox" + Margin="0,0,0,4" + HorizontalAlignment="Stretch" + CornerRadius="8,8,0,0" + Text="{x:Bind PreLaunchCommand, Mode=TwoWay}" /> + <TextBlock + Margin="0,0,0,8" + FontWeight="Semibold" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_WarningAdmin}" /> + <TextBlock + Margin="0,0,8,8" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_PostExit_Title}" /> + <ToggleSwitch + Margin="0,0,0,8" + Header="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_PostExit_Subtitle}" + IsOn="{x:Bind IsUsePostExitCommand, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + <TextBox + x:Name="PostExitCommandTextBox" + Margin="0,0,0,4" + HorizontalAlignment="Stretch" + CornerRadius="8,8,0,0" + Text="{x:Bind PostExitCommand, Mode=TwoWay}" /> + <TextBlock + Margin="0,0,0,16" + FontWeight="Semibold" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_WarningAdmin}" /> + </StackPanel> + </StackPanel> + </ScrollViewer> + <Grid + x:Name="GameSettingsApplyGrid" + Margin="16" + Padding="16,16" + HorizontalAlignment="Stretch" + VerticalAlignment="Bottom" + Background="{ThemeResource GameSettingsApplyGridBrush}" + CornerRadius="8" + Shadow="{ThemeResource SharedShadow}"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition /> + <ColumnDefinition Width="Auto" /> + </Grid.ColumnDefinitions> + <Button + x:Name="ApplyButton" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Click="ApplyButton_Click" + CornerRadius="16" + IsEnabled="True" + Shadow="{ThemeResource SharedShadow}" + Style="{ThemeResource AccentButtonStyle}"> + <StackPanel Margin="8,0" Orientation="Horizontal"> + <FontIcon + FontFamily="{ThemeResource FontAwesomeSolid}" + FontSize="14" + Glyph="" /> + <TextBlock + Margin="8,0,0,0" + FontWeight="Medium" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.ApplyBtn}" /> + </StackPanel> + </Button> + <TextBlock + x:Name="ApplyText" + Grid.Column="1" + Margin="16,-4,0,0" + HorizontalAlignment="Stretch" + VerticalAlignment="Center" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.SettingsApplied}" + TextWrapping="Wrap" + Visibility="Collapsed" /> + <StackPanel + Grid.Column="2" + HorizontalAlignment="Right" + Orientation="Horizontal"> + <TextBlock + Margin="16,-4,16,0" + VerticalAlignment="Center" + FontWeight="Medium" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportExport}" /> + <Button + x:Name="RegistryExport" + Height="32" + Click="RegistryExportClick" + CornerRadius="16,0,0,16" + Shadow="{ThemeResource SharedShadow}" + Style="{ThemeResource AccentButtonStyle}" + ToolTipService.ToolTip="{x:Bind helper:Locale.Lang._GameSettingsPage.RegExportTooltip}"> + <StackPanel Margin="8,0" Orientation="Horizontal"> + <FontIcon + FontFamily="{ThemeResource FontAwesomeSolid}" + FontSize="14" + Glyph="" /> + <TextBlock + Margin="8,0,0,0" + FontWeight="Medium" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegExportTitle}" /> + </StackPanel> + </Button> + <Button + x:Name="RegistryImport" + Height="32" + Click="RegistryImportClick" + CornerRadius="0,16,16,0" + Shadow="{ThemeResource SharedShadow}" + Style="{ThemeResource AccentButtonStyle}" + ToolTipService.ToolTip="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportTooltip}"> + <StackPanel Margin="8,0" Orientation="Horizontal"> + <TextBlock + Margin="0,0,8,0" + FontWeight="Medium" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportTitle}" /> + <FontIcon + FontFamily="{ThemeResource FontAwesomeSolid}" + FontSize="14" + Glyph="" /> + </StackPanel> + </Button> + </StackPanel> + </Grid> + </Grid> + <Grid x:Name="Overlay" Visibility="Collapsed"> + <StackPanel + Margin="0,176,0,0" + HorizontalAlignment="Center" + VerticalAlignment="Center" + Orientation="Vertical"> + <ProgressRing + x:Name="Ring" + Width="48" + Height="48" + Margin="32" + IsActive="True" + IsIndeterminate="false" + Maximum="100" + Value="100" /> + <TextBlock + x:Name="OverlayTitle" + HorizontalAlignment="Center" + VerticalAlignment="Center" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="Title" /> + <TextBlock + x:Name="OverlaySubtitle" + Margin="0,8,0,192" + HorizontalAlignment="Center" + VerticalAlignment="Center" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="Subtitle" /> + </StackPanel> + </Grid> + </Grid> +</Page> diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/GenshinGameSettingsPage.xaml.cs b/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/GenshinGameSettingsPage.xaml.cs similarity index 100% rename from CollapseLauncher/XAMLs/MainApp/Pages/GenshinGameSettingsPage.xaml.cs rename to CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/GenshinGameSettingsPage.xaml.cs diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPage.Ext.cs b/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/HonkaiGameSettingsPage.Ext.cs similarity index 83% rename from CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPage.Ext.cs rename to CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/HonkaiGameSettingsPage.Ext.cs index e20caebc9..75dd52c4a 100644 --- a/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPage.Ext.cs +++ b/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/HonkaiGameSettingsPage.Ext.cs @@ -9,11 +9,12 @@ namespace CollapseLauncher.Pages { - public partial class GameSettingsPage : Page, INotifyPropertyChanged + public partial class HonkaiGameSettingsPage : Page, INotifyPropertyChanged { #region Fields private int prevGraphSelect; #endregion + #region Methods public event PropertyChangedEventHandler PropertyChanged = delegate { }; private void OnPropertyChanged([CallerMemberName] string propertyName = null) @@ -446,5 +447,98 @@ public bool IsGameBoost set => Settings.SettingsCollapseMisc.UseGameBoost = value; } #endregion + + #region Advanced Settings + public bool IsUseAdvancedSettings + { + get + { + bool value = Settings.SettingsCollapseMisc.UseAdvancedGameSettings; + if (value){AdvancedSettingsPanel.Visibility = Microsoft.UI.Xaml.Visibility.Visible;} + else AdvancedSettingsPanel.Visibility = Microsoft.UI.Xaml.Visibility.Collapsed; + return value; + } + set + { + Settings.SettingsCollapseMisc.UseAdvancedGameSettings = value; + if (value) AdvancedSettingsPanel.Visibility = Microsoft.UI.Xaml.Visibility.Visible; + else AdvancedSettingsPanel.Visibility = Microsoft.UI.Xaml.Visibility.Collapsed; + } + } + + public bool IsUsePreLaunchCommand + { + get + { + bool value = Settings.SettingsCollapseMisc.UseGamePreLaunchCommand; + + if (value) + { + PreLaunchCommandTextBox.IsEnabled = true; + PreLaunchForceCloseToggle.IsEnabled = true; + } + else + { + PreLaunchCommandTextBox.IsEnabled = false; + PreLaunchForceCloseToggle.IsEnabled = false; + } + + return value; + } + set + { + if (value) + { + PreLaunchCommandTextBox.IsEnabled = true; + PreLaunchForceCloseToggle.IsEnabled = true; + } + else + { + PreLaunchCommandTextBox.IsEnabled = false; + PreLaunchForceCloseToggle.IsEnabled = false; + } + + Settings.SettingsCollapseMisc.UseGamePreLaunchCommand = value; + } + } + + public string PreLaunchCommand + { + get => Settings.SettingsCollapseMisc.GamePreLaunchCommand; + set => Settings.SettingsCollapseMisc.GamePreLaunchCommand = value; + } + + public bool IsPreLaunchCommandExitOnGameClose + { + get => Settings.SettingsCollapseMisc.GamePreLaunchExitOnGameStop; + set => Settings.SettingsCollapseMisc.GamePreLaunchExitOnGameStop = value; + } + + public bool IsUsePostExitCommand + { + get + { + bool value = Settings.SettingsCollapseMisc.UseGamePostExitCommand; + + if (value) PostExitCommandTextBox.IsEnabled = true; + else PostExitCommandTextBox.IsEnabled = false; + + return value; + } + set + { + if (value) PostExitCommandTextBox.IsEnabled = true; + else PostExitCommandTextBox.IsEnabled = false; + + Settings.SettingsCollapseMisc.UseGamePostExitCommand = value; + } + } + + public string PostExitCommand + { + get => Settings.SettingsCollapseMisc.GamePostExitCommand; + set => Settings.SettingsCollapseMisc.GamePostExitCommand = value; + } + #endregion } } diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/HonkaiGameSettingsPage.xaml b/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/HonkaiGameSettingsPage.xaml new file mode 100644 index 000000000..0c1abcc8c --- /dev/null +++ b/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/HonkaiGameSettingsPage.xaml @@ -0,0 +1,912 @@ +<Page + x:Class="CollapseLauncher.Pages.HonkaiGameSettingsPage" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:conv="using:CollapseLauncher.Pages" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:helper="using:Hi3Helper" + xmlns:local="using:CollapseLauncher" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:settype="using:CollapseLauncher.GameSettings" + Loaded="InitializeSettings" + Unloaded="OnUnload" + mc:Ignorable="d"> + <Page.Resources> + <ThemeShadow x:Name="SharedShadow" /> + <conv:InverseBooleanConverter x:Key="BooleanInverse" /> + </Page.Resources> + <Grid> + <Grid x:Name="PageContent"> + <ScrollViewer VerticalScrollBarVisibility="Auto"> + <StackPanel Margin="32,40,32,32" Padding="0,0,0,74"> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource TitleLargeTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Title}" /> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0"> + <StackPanel x:Name="GameResolutionPanel" Margin="0,16"> + <StackPanel> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResolutionPanel}" /> + <StackPanel + x:Name="GameResolutionWindow" + Margin="0,0,0,8" + Orientation="Vertical"> + <CheckBox + x:Name="GameResolutionFullscreen" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Fullscreen}" + IsChecked="{x:Bind IsFullscreenEnabled, Mode=TwoWay}" /> + <CheckBox + x:Name="GameResolutionFullscreenExclusive" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ExclusiveFullscreen}" + IsChecked="{x:Bind IsExclusiveFullscreenEnabled, Mode=TwoWay}" + IsEnabled="{x:Bind IsCanExclusiveFullscreen, Mode=OneWay}" /> + <CheckBox + x:Name="GameResolutionBorderless" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Borderless}" + IsChecked="{x:Bind IsBorderlessEnabled, Mode=TwoWay}" /> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + </Grid.ColumnDefinitions> + <CheckBox + x:Name="GameWindowResizable" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResizableWindow}" + IsChecked="{x:Bind IsResizableWindow, Mode=TwoWay}" + IsEnabled="{x:Bind IsCanResizableWindow, Mode=OneWay}" /> + <Button + Grid.Column="1" + Margin="8,-4,0,0" + Style="{ThemeResource ButtonRevealStyle}"> + <Button.Content> + <FontIcon + FontFamily="{ThemeResource FontAwesome}" + FontSize="12" + Glyph="?" /> + </Button.Content> + <Button.Flyout> + <Flyout AllowFocusOnInteraction="True"> + <TextBlock + MaxWidth="360" + FontWeight="SemiBold" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResizableWindowTooltip}" + TextAlignment="Center" + TextWrapping="Wrap" /> + </Flyout> + </Button.Flyout> + </Button> + </Grid> + </StackPanel> + <StackPanel Margin="0,0,0,16" Orientation="Horizontal"> + <ComboBox + x:Name="GameResolutionSelector" + Width="128" + CornerRadius="14" + IsEnabled="{x:Bind IsCustomResolutionEnabled, Mode=OneWay, Converter={StaticResource BooleanInverse}}" + PlaceholderText="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResSelectPlaceholder}" + SelectedItem="{x:Bind ResolutionSelected, Mode=TwoWay}" /> + <CheckBox + x:Name="GameCustomResolutionCheckbox" + Margin="16,0,0,0" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResCustom}" + IsChecked="{x:Bind IsCustomResolutionEnabled, Mode=TwoWay}" + IsEnabled="{x:Bind IsExclusiveFullscreenEnabled, Mode=OneWay, Converter={StaticResource BooleanInverse}}" /> + </StackPanel> + </StackPanel> + <StackPanel x:Name="GameCustomResolutionPanel" Orientation="Horizontal"> + <TextBlock + Margin="0,0,8,0" + VerticalAlignment="Center" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResCustomW}" /> + <NumberBox + x:Name="GameCustomResolutionWidth" + Width="100" + HorizontalAlignment="Left" + CornerRadius="8,8,0,0" + IsEnabled="{x:Bind IsCanResolutionWH, Mode=OneWay}" + Value="{x:Bind ResolutionW, Mode=TwoWay}" /> + <TextBlock + Margin="16,0,8,0" + VerticalAlignment="Center" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResCustomH}" /> + <NumberBox + x:Name="GameCustomResolutionHeight" + Width="100" + HorizontalAlignment="Left" + CornerRadius="8,8,0,0" + IsEnabled="{x:Bind IsCanResolutionWH, Mode=OneWay}" + Value="{x:Bind ResolutionH, Mode=TwoWay}" /> + </StackPanel> + </StackPanel> + <TextBlock + Margin="0,8" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FPSPanel}" /> + <StackPanel + x:Name="GameMaxFPSPanel" + Margin="0,8" + Orientation="Horizontal"> + <StackPanel x:Name="GameMaxFPSInCombatPanel" Orientation="Vertical"> + <TextBlock + Margin="0,0,0,8" + VerticalAlignment="Center" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FPSInCombat}" /> + <StackPanel Orientation="Horizontal"> + <NumberBox + x:Name="GameMaxFPSInCombatValue" + Width="64" + HorizontalAlignment="Left" + CornerRadius="8,8,0,0" + IsEnabled="True" + Maximum="1024" + Value="{x:Bind FPSInCombat, Mode=TwoWay}" /> + <TextBlock + Margin="8,0,8,0" + VerticalAlignment="Center" + Text="FPS" /> + </StackPanel> + </StackPanel> + <StackPanel + x:Name="GameMaxFPSInMainMenuPanel" + Margin="16,0" + Orientation="Vertical"> + <TextBlock + Margin="0,0,0,8" + VerticalAlignment="Center" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FPSInMenu}" /> + <StackPanel Orientation="Horizontal"> + <NumberBox + x:Name="GameMaxFPSInMainMenuValue" + Width="64" + HorizontalAlignment="Left" + CornerRadius="8,8,0,0" + IsEnabled="True" + Maximum="1024" + Value="{x:Bind FPSInMainMenu, Mode=TwoWay}" /> + <TextBlock + Margin="8,0,8,0" + VerticalAlignment="Center" + Text="FPS" /> + </StackPanel> + </StackPanel> + </StackPanel> + <TextBlock + Margin="0,16" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APIPanel}" /> + <StackPanel x:Name="GraphicsAPIPanel" Orientation="Horizontal"> + <ComboBox + x:Name="GraphicsAPISelector" + Width="224" + CornerRadius="14" + PlaceholderText="Select" + SelectedIndex="{x:Bind GraphicsAPI, Mode=TwoWay}"> + <ComboBoxItem Content="DirectX 11 (FL 10.1)" /> + <ComboBoxItem Content="DirectX 11 (FL 11.0) No ST" /> + <ComboBoxItem Content="DirectX 11 (FL 11.1)" /> + <ComboBoxItem Content="DirectX 11 (FL 11.1) No ST" /> + <ComboBoxItem Content="DirectX 12 [EXPERIMENTAL]" /> + </ComboBox> + <Button Margin="16,0"> + <Button.Content> + <FontIcon + FontFamily="{ThemeResource FontAwesome}" + FontSize="12" + Glyph="?" /> + </Button.Content> + <Button.Flyout> + <Flyout> + <StackPanel Width="318"> + <TextBlock Style="{ThemeResource BaseTextBlockStyle}"> + <Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APIHelp1}" /> + <LineBreak /><LineBreak /> + <Run Text="- DirectX 11 level 10.1" /><LineBreak /> + <Run Text="- DirectX 11 level 11.0 No Single-Thread (Default)" /><LineBreak /> + <Run Text="- DirectX 11 level 11.1" /><LineBreak /> + <Run Text="- DirectX 11 level 11.1 No Single-Thread" /><LineBreak /> + <Run Text="- DirectX 12 (Experimental)" /><LineBreak /> + </TextBlock> + <TextBlock Style="{ThemeResource BaseTextBlockStyle}"> + <Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APIHelp2}" /> + <Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APIHelp3}" /> + </TextBlock> + </StackPanel> + </Flyout> + </Button.Flyout> + </Button> + </StackPanel> + <StackPanel x:Name="GameBoostPanel" Orientation="Horizontal"> + <ToggleSwitch + Margin="4,12,0,8" + Header="{x:Bind helper:Locale.Lang._GameSettingsPage.GameBoost}" + IsOn="{x:Bind IsGameBoost, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + </StackPanel> + </StackPanel> + <StackPanel + x:Name="GameGraphicsPanel" + Grid.Column="1" + Margin="0,16"> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_SpecPanel}" /> + <StackPanel> + <TextBlock + Margin="0,0,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Preset}" /> + <ComboBox + x:Name="GameGraphicsPresetSelector" + Margin="0,0,0,16" + CornerRadius="14" + ItemsSource="{x:Bind PresetRenderingNames}" + SelectedIndex="{x:Bind PresetRenderingIndex, Mode=TwoWay}" /> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0"> + <TextBlock + Margin="0,0,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Render}" /> + <ComboBox + x:Name="RenderingAccuracySelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind GraphicsRenderingAccuracy, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecHigh}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecVeryHigh}" /> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="1"> + <TextBlock + Margin="0,0,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Shadow}" /> + <ComboBox + x:Name="ShadowQualitySelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind GraphicsShadowQuality, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecDisabled}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecHigh}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecVeryHigh}" /> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="2"> + <TextBlock + Margin="0,0,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Reflection}" /> + <ComboBox + x:Name="ReflectionQualitySelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind GraphicsReflectionQuality, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecDisabled}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecHigh}" /> + </ComboBox> + </StackPanel> + </Grid> + <TextBlock + Margin="0,8,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FX}" /> + <Expander + x:Name="GameFXPostProcExpander" + MaxWidth="514" + Margin="0,0,0,8" + HorizontalContentAlignment="Stretch" + CornerRadius="8" + IsExpanded="{x:Bind IsGraphicsPostFXEnabled, Mode=OneWay}"> + <Expander.Header> + <StackPanel Orientation="Horizontal"> + <CheckBox x:Name="GameFXPostProcCheckBox" IsChecked="{x:Bind IsGraphicsPostFXEnabled, Mode=TwoWay}"> + <CheckBox.Content> + <TextBlock Style="{ThemeResource BodyStrongTextBlockStyle}" Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FXPost}" /> + </CheckBox.Content> + </CheckBox> + <CheckBox + x:Name="GameFXPhysicsCheckBox" + Margin="12,0,0,0" + IsChecked="{x:Bind IsGraphicsPhysicsEnabled, Mode=TwoWay}"> + <CheckBox.Content> + <TextBlock Style="{ThemeResource BodyStrongTextBlockStyle}" Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FXPhysics}" /> + </CheckBox.Content> + </CheckBox> + </StackPanel> + </Expander.Header> + <Expander.Content> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition MinWidth="100" /> + <ColumnDefinition MinWidth="100" /> + <ColumnDefinition MinWidth="100" /> + <ColumnDefinition MinWidth="100" /> + </Grid.ColumnDefinitions> + <CheckBox + x:Name="GameFXHDRCheckBox" + Grid.Column="0" + MinWidth="0" + Margin="8,0,0,0" + Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FXHDR}" + IsChecked="{x:Bind IsGraphicsFXHDREnabled, Mode=TwoWay}" + IsEnabled="{x:Bind IsGraphicsPostFXEnabled, Mode=OneWay}" /> + <CheckBox + x:Name="GameFXHighQualityCheckBox" + Grid.Column="1" + MinWidth="0" + Margin="8,0,0,0" + Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FXHQ}" + IsChecked="{x:Bind IsGraphicsFXHighQualityEnabled, Mode=TwoWay}" + IsEnabled="{x:Bind IsGraphicsPostFXEnabled, Mode=OneWay}" /> + <CheckBox + x:Name="GameFXFXAACheckBox" + Grid.Column="2" + MinWidth="0" + Margin="8,0,0,0" + HorizontalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FXAA}" + IsChecked="{x:Bind IsGraphicsFXFXAAEnabled, Mode=TwoWay}" + IsEnabled="{x:Bind IsGraphicsPostFXEnabled, Mode=OneWay}" /> + <CheckBox + x:Name="GameFXDistortionCheckBox" + Grid.Column="3" + MinWidth="0" + Margin="8,0,0,0" + HorizontalAlignment="Right" + Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_FXDistort}" + IsChecked="{x:Bind IsGraphicsFXDistortionEnabled, Mode=TwoWay}" + IsEnabled="{x:Bind IsGraphicsPostFXEnabled, Mode=OneWay}" /> + </Grid> + </Expander.Content> + </Expander> + </StackPanel> + <TextBlock + Margin="0,8,0,16" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APHO2Panel}" /> + <StackPanel> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0"> + <TextBlock + Margin="0,0,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APHO2GI}" /> + <ComboBox + x:Name="GlobalIlluminationSelector" + Width="128" + CornerRadius="14" + SelectedIndex="{x:Bind GraphicsGlobalIllumination, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecHigh}" /> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="1"> + <TextBlock + Margin="0,0,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APHO2AO}" /> + <ComboBox + x:Name="AmbientOcclusionSelector" + Width="128" + CornerRadius="14" + SelectedIndex="{x:Bind GraphicsAmbientOcclusion, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecDisabled}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecHigh}" /> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="2"> + <TextBlock + Margin="0,0,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APHO2LOD}" /> + <ComboBox + x:Name="LevelOfDetailSelector" + Width="128" + CornerRadius="14" + SelectedIndex="{x:Bind GraphicsLevelOfDetail, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecHigh}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecLow}" /> + </ComboBox> + </StackPanel> + </Grid> + <Grid Margin="0,16,0,0"> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0"> + <TextBlock + Margin="0,0,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_APHO2VL}" /> + <ComboBox + x:Name="GameVolumetricLightSelector" + Width="128" + CornerRadius="14" + SelectedIndex="{x:Bind GraphicsVolumetricLight, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.SpecHigh}" /> + </ComboBox> + </StackPanel> + </Grid> + </StackPanel> + </StackPanel> + </Grid> + <MenuFlyoutSeparator Margin="0,4,0,8" /> + <TextBlock + Margin="0,0,0,8" + Style="{ThemeResource TitleLargeTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_Title}" /> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0"> + <StackPanel x:Name="AudioSettingsPanelLeft" Margin="0,8,64,16"> + <StackPanel> + <TextBlock + Margin="0,0,0,8" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_Master}" /> + <StackPanel Margin="0,0,32,8" Orientation="Vertical"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="40px" /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <TextBlock + VerticalAlignment="Center" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{Binding Value, ElementName=AudioMasterVolumeSlider}" /> + <Slider + x:Name="AudioMasterVolumeSlider" + Grid.Column="1" + Maximum="100" + TickFrequency="1" + TickPlacement="Outside" + Value="{x:Bind AudioMasterVolume, Mode=TwoWay}" /> + </Grid> + </StackPanel> + </StackPanel> + <StackPanel> + <TextBlock + Margin="0,16,0,8" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_BGM}" /> + <StackPanel Margin="0,0,32,8" Orientation="Vertical"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="40px" /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <TextBlock + VerticalAlignment="Center" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{Binding Value, ElementName=AudioBGMVolumeSlider}" /> + <Slider + x:Name="AudioBGMVolumeSlider" + Grid.Column="1" + Maximum="100" + TickFrequency="1" + TickPlacement="Outside" + Value="{x:Bind AudioBGMVolume, Mode=TwoWay}" /> + </Grid> + </StackPanel> + </StackPanel> + <StackPanel> + <TextBlock + Margin="0,16,0,8" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_SFX}" /> + <StackPanel Margin="0,0,32,8" Orientation="Vertical"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="40px" /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <TextBlock + VerticalAlignment="Center" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{Binding Value, ElementName=AudioSFXVolumeSlider}" /> + <Slider + x:Name="AudioSFXVolumeSlider" + Grid.Column="1" + Maximum="100" + TickFrequency="1" + TickPlacement="Outside" + Value="{x:Bind AudioSFXVolume, Mode=TwoWay}" /> + </Grid> + </StackPanel> + </StackPanel> + <StackPanel> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel> + <TextBlock + Margin="0,8,0,8" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_VOLang}" /> + <ComboBox + x:Name="AudioCVLanguageSelector" + Width="172" + CornerRadius="14" + SelectedIndex="{x:Bind AudioVoiceLanguage, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_VOLang1}" /> + <ComboBoxItem> + <TextBlock><Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_VOLang2}" /><Run FontWeight="Bold" Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_VODefault}" /></TextBlock> + </ComboBoxItem> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="1" HorizontalAlignment="Center"> + <TextBlock + Margin="0,8,0,4" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_Mute}" /> + <ToggleSwitch + IsOn="{x:Bind AudioMute, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + </StackPanel> + </Grid> + </StackPanel> + </StackPanel> + </StackPanel> + <StackPanel Grid.Column="1"> + <StackPanel x:Name="AudioSettingsPanelRight" Margin="0,8,64,16"> + <StackPanel> + <TextBlock + Margin="0,0,0,8" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_VO}" /> + <StackPanel Margin="0,0,32,8" Orientation="Vertical"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="40px" /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <TextBlock + VerticalAlignment="Center" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{Binding Value, ElementName=AudioCVVolumeSlider}" /> + <Slider + x:Name="AudioCVVolumeSlider" + Grid.Column="1" + Maximum="100" + TickFrequency="1" + TickPlacement="Outside" + Value="{x:Bind AudioVoiceVolume, Mode=TwoWay}" /> + </Grid> + </StackPanel> + </StackPanel> + <StackPanel> + <TextBlock + Margin="0,16,0,8" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_Elf}" /> + <StackPanel Margin="0,0,32,8" Orientation="Vertical"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="40px" /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <TextBlock + VerticalAlignment="Center" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{Binding Value, ElementName=AudioElfCVVolumeSlider}" /> + <Slider + x:Name="AudioElfCVVolumeSlider" + Grid.Column="1" + Maximum="100" + TickFrequency="1" + TickPlacement="Outside" + Value="{x:Bind AudioElfVolume, Mode=TwoWay}" /> + </Grid> + </StackPanel> + </StackPanel> + <StackPanel> + <TextBlock + Margin="0,16,0,8" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Audio_Cutscenes}" /> + <StackPanel Margin="0,0,32,8" Orientation="Vertical"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="40px" /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <TextBlock + VerticalAlignment="Center" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{Binding Value, ElementName=AudioCutscenesVolumeSlider}" /> + <Slider + x:Name="AudioCutscenesVolumeSlider" + Grid.Column="1" + Maximum="100" + TickFrequency="1" + TickPlacement="Outside" + Value="{x:Bind AudioCutsceneVolume, Mode=TwoWay}" /> + </Grid> + </StackPanel> + </StackPanel> + </StackPanel> + </StackPanel> + </Grid> + <MenuFlyoutSeparator Margin="0,4,0,8" /> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource TitleLargeTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.CustomArgs_Title}" /> + <TextBlock + Margin="0,0,0,0" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.CustomArgs_Subtitle}" /> + <ToggleSwitch + Margin="0,0,0,16" + IsOn="{x:Bind IsUseCustomArgs, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + <TextBox + x:Name="CustomArgsTextBox" + Margin="0,0,0,16" + HorizontalAlignment="Stretch" + CornerRadius="8,8,0,0" + Text="{x:Bind CustomArgsValue, Mode=TwoWay}" /> + <TextBlock Height="Auto" TextWrapping="WrapWholeWords"> + <Run Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.CustomArgs_Footer1}" /> + <Hyperlink NavigateUri="https://docs.unity3d.com/Manual/PlayerCommandLineArguments.html" UnderlineStyle="None"> + <Run FontWeight="Bold" Text="{x:Bind helper:Locale.Lang._GameSettingsPage.CustomArgs_Footer2}" /> + </Hyperlink> + <Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.CustomArgs_Footer3}" /> + </TextBlock> + <MenuFlyoutSeparator Margin="0,16,0,16" /> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + </Grid.ColumnDefinitions> + <TextBlock + Grid.Column="0" + Margin="0,0,8,0" + VerticalAlignment="Stretch" + Style="{ThemeResource TitleLargeTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_Title}" /> + <ToggleSwitch + Grid.Column="1" + FontWeight="SemiBold" + FontSize="26" + VerticalAlignment="Stretch" + VerticalContentAlignment="Stretch" + Margin="8,12,0,8" + IsOn="{x:Bind IsUseAdvancedSettings, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + </Grid> + <StackPanel x:Name="AdvancedSettingsPanel"> + <TextBlock Margin="0,0,0,8" TextWrapping="WrapWholeWords"> + <Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_Subtitle1}" /> + <Run FontWeight="Bold" Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_Subtitle2}" /> + <Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_Subtitle3}" /> + </TextBlock> + <TextBlock + Margin="0,0,8,8" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_PreLaunch_Title}" /> + <ToggleSwitch + x:Name="PreLaunchToggle" + Margin="0,0,0,0" + Header="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_PreLaunch_Subtitle}" + IsOn="{x:Bind IsUsePreLaunchCommand, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + <ToggleSwitch + x:Name="PreLaunchForceCloseToggle" + Margin="0,0,0,8" + Header="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_PreLaunch_Exit}" + IsOn="{x:Bind IsPreLaunchCommandExitOnGameClose, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + <TextBox + x:Name="PreLaunchCommandTextBox" + Margin="0,0,0,4" + HorizontalAlignment="Stretch" + CornerRadius="8,8,0,0" + Text="{x:Bind PreLaunchCommand, Mode=TwoWay}" /> + <TextBlock + Margin="0,0,0,8" + FontWeight="Semibold" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_WarningAdmin}" /> + <TextBlock + Margin="0,0,8,8" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_PostExit_Title}" /> + <ToggleSwitch + x:Name="PostExitToggle" + Margin="0,0,0,8" + Header="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_PostExit_Subtitle}" + IsOn="{x:Bind IsUsePostExitCommand, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + <TextBox + x:Name="PostExitCommandTextBox" + Margin="0,0,0,4" + HorizontalAlignment="Stretch" + CornerRadius="8,8,0,0" + Text="{x:Bind PostExitCommand, Mode=TwoWay}" /> + <TextBlock + Margin="0,0,0,16" + FontWeight="Semibold" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_WarningAdmin}" /> + </StackPanel> + </StackPanel> + </ScrollViewer> + <Grid + x:Name="GameSettingsApplyGrid" + Margin="16" + Padding="16,16" + HorizontalAlignment="Stretch" + VerticalAlignment="Bottom" + Background="{ThemeResource GameSettingsApplyGridBrush}" + CornerRadius="8" + Shadow="{ThemeResource SharedShadow}"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition /> + <ColumnDefinition Width="Auto" /> + </Grid.ColumnDefinitions> + <Button + x:Name="ApplyButton" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Click="ApplyButton_Click" + CornerRadius="16" + IsEnabled="True" + Shadow="{ThemeResource SharedShadow}" + Style="{ThemeResource AccentButtonStyle}"> + <StackPanel Margin="8,0" Orientation="Horizontal"> + <FontIcon + FontFamily="{ThemeResource FontAwesomeSolid}" + FontSize="14" + Glyph="" /> + <TextBlock + Margin="8,0,0,0" + FontWeight="Medium" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.ApplyBtn}" /> + </StackPanel> + </Button> + <TextBlock + x:Name="ApplyText" + Grid.Column="1" + Margin="16,-4,0,0" + HorizontalAlignment="Stretch" + VerticalAlignment="Center" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.SettingsApplied}" + TextWrapping="Wrap" + Visibility="Collapsed" /> + <StackPanel + Grid.Column="2" + HorizontalAlignment="Right" + Orientation="Horizontal"> + <TextBlock + Margin="16,-4,16,0" + VerticalAlignment="Center" + FontWeight="Medium" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportExport}" /> + <Button + x:Name="RegistryExport" + Height="32" + Click="RegistryExportClick" + CornerRadius="16,0,0,16" + Shadow="{ThemeResource SharedShadow}" + Style="{ThemeResource AccentButtonStyle}" + ToolTipService.ToolTip="{x:Bind helper:Locale.Lang._GameSettingsPage.RegExportTooltip}"> + <StackPanel Margin="8,0" Orientation="Horizontal"> + <FontIcon + FontFamily="{ThemeResource FontAwesomeSolid}" + FontSize="14" + Glyph="" /> + <TextBlock + Margin="8,0,0,0" + FontWeight="Medium" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegExportTitle}" /> + </StackPanel> + </Button> + <Button + x:Name="RegistryImport" + Height="32" + Click="RegistryImportClick" + CornerRadius="0,16,16,0" + Shadow="{ThemeResource SharedShadow}" + Style="{ThemeResource AccentButtonStyle}" + ToolTipService.ToolTip="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportTooltip}"> + <StackPanel Margin="8,0" Orientation="Horizontal"> + <TextBlock + Margin="0,0,8,0" + FontWeight="Medium" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportTitle}" /> + <FontIcon + FontFamily="{ThemeResource FontAwesomeSolid}" + FontSize="14" + Glyph="" /> + </StackPanel> + </Button> + </StackPanel> + </Grid> + </Grid> + <Grid x:Name="Overlay" Visibility="Collapsed"> + <StackPanel + Margin="0,176,0,0" + HorizontalAlignment="Center" + VerticalAlignment="Center" + Orientation="Vertical"> + <ProgressRing + x:Name="Ring" + Width="48" + Height="48" + Margin="32" + IsActive="True" + IsIndeterminate="false" + Maximum="100" + Value="100" /> + <TextBlock + x:Name="OverlayTitle" + HorizontalAlignment="Center" + VerticalAlignment="Center" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="Title" /> + <TextBlock + x:Name="OverlaySubtitle" + Margin="0,8,0,192" + HorizontalAlignment="Center" + VerticalAlignment="Center" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="Subtitle" /> + </StackPanel> + </Grid> + </Grid> +</Page> diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPage.xaml.cs b/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/HonkaiGameSettingsPage.xaml.cs similarity index 98% rename from CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPage.xaml.cs rename to CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/HonkaiGameSettingsPage.xaml.cs index 1e2e139ee..3b5c2ee6a 100644 --- a/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPage.xaml.cs +++ b/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/HonkaiGameSettingsPage.xaml.cs @@ -21,14 +21,14 @@ namespace CollapseLauncher.Pages { - public partial class GameSettingsPage : Page + public partial class HonkaiGameSettingsPage : Page { private GamePresetProperty CurrentGameProperty { get; set; } private HonkaiSettings Settings { get => (HonkaiSettings)CurrentGameProperty._GameSettings; } private Brush InheritApplyTextColor { get; set; } private RegistryMonitor RegistryWatcher { get; set; } private bool IsNoReload { get; set; } - public GameSettingsPage() + public HonkaiGameSettingsPage() { try { diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/StarRailGameSettingsPage.Ext.cs b/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/StarRailGameSettingsPage.Ext.cs similarity index 69% rename from CollapseLauncher/XAMLs/MainApp/Pages/StarRailGameSettingsPage.Ext.cs rename to CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/StarRailGameSettingsPage.Ext.cs index 443f9ad63..31fb66c24 100644 --- a/CollapseLauncher/XAMLs/MainApp/Pages/StarRailGameSettingsPage.Ext.cs +++ b/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/StarRailGameSettingsPage.Ext.cs @@ -1,12 +1,24 @@ using CollapseLauncher.GameSettings.StarRail; +using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using System; +using System.ComponentModel; using System.Drawing; +using System.Runtime.CompilerServices; namespace CollapseLauncher.Pages { - public partial class StarRailGameSettingsPage : Page + public partial class StarRailGameSettingsPage : Page, INotifyPropertyChanged { + #region Methods + public event PropertyChangedEventHandler PropertyChanged = delegate { }; + private void OnPropertyChanged([CallerMemberName] string propertyName = null) + { + // Raise the PropertyChanged event, passing the name of the property whose value has changed. + this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + #endregion + #region GameResolution public bool IsFullscreenEnabled { @@ -176,11 +188,24 @@ public int FPS { get { - int fpsValue = NormalizeFPSNumber(Settings.GraphicsSettings.FPS); - return Model.FPSIndexDict[fpsValue]; + int value = Model.FPSIndexDict[NormalizeFPSNumber(Settings.GraphicsSettings.FPS)]; + if (value == 2) + { + VSyncToggle.IsChecked = false; + VSyncToggle.IsEnabled = false; + } + + return value; } set { + if (value == 2) + { + VSyncToggle.IsChecked = false; + VSyncToggle.IsEnabled = false; + } + else { VSyncToggle.IsEnabled = true; } + Settings.GraphicsSettings.FPS = Model.FPSIndex[value]; } } @@ -221,8 +246,17 @@ public int LightQuality //CharacterQuality public int CharacterQuality { - get => (int)Settings.GraphicsSettings.CharacterQuality; - set => Settings.GraphicsSettings.CharacterQuality = (Quality)value; + get + { + int value = (int)Settings.GraphicsSettings.CharacterQuality; + + // Clamp value + if (value < 2) return 2; // Low + if (value > 4) return 4; // High + + return value; + } + set => Settings.GraphicsSettings.CharacterQuality = (CharacterQualityEnum)value; } //EnvDetailQuality public int EnvDetailQuality @@ -301,5 +335,98 @@ public bool IsGameBoost set => Settings.SettingsCollapseMisc.UseGameBoost = value; } #endregion + + #region Advanced Settings + public bool IsUseAdvancedSettings + { + get + { + bool value = Settings.SettingsCollapseMisc.UseAdvancedGameSettings; + if (value){AdvancedSettingsPanel.Visibility = Visibility.Visible;} + else AdvancedSettingsPanel.Visibility = Visibility.Collapsed; + return value; + } + set + { + Settings.SettingsCollapseMisc.UseAdvancedGameSettings = value; + if (value) AdvancedSettingsPanel.Visibility = Visibility.Visible; + else AdvancedSettingsPanel.Visibility = Visibility.Collapsed; + } + } + + public bool IsUsePreLaunchCommand + { + get + { + bool value = Settings.SettingsCollapseMisc.UseGamePreLaunchCommand; + + if (value) + { + PreLaunchCommandTextBox.IsEnabled = true; + PreLaunchForceCloseToggle.IsEnabled = true; + } + else + { + PreLaunchCommandTextBox.IsEnabled = false; + PreLaunchForceCloseToggle.IsEnabled = false; + } + + return value; + } + set + { + if (value) + { + PreLaunchCommandTextBox.IsEnabled = true; + PreLaunchForceCloseToggle.IsEnabled = true; + } + else + { + PreLaunchCommandTextBox.IsEnabled = false; + PreLaunchForceCloseToggle.IsEnabled = false; + } + + Settings.SettingsCollapseMisc.UseGamePreLaunchCommand = value; + } + } + + public string PreLaunchCommand + { + get => Settings.SettingsCollapseMisc.GamePreLaunchCommand; + set => Settings.SettingsCollapseMisc.GamePreLaunchCommand = value; + } + + public bool IsPreLaunchCommandExitOnGameClose + { + get => Settings.SettingsCollapseMisc.GamePreLaunchExitOnGameStop; + set => Settings.SettingsCollapseMisc.GamePreLaunchExitOnGameStop = value; + } + + public bool IsUsePostExitCommand + { + get + { + bool value = Settings.SettingsCollapseMisc.UseGamePostExitCommand; + + if (value) PostExitCommandTextBox.IsEnabled = true; + else PostExitCommandTextBox.IsEnabled = false; + + return value; + } + set + { + if (value) PostExitCommandTextBox.IsEnabled = true; + else PostExitCommandTextBox.IsEnabled = false; + + Settings.SettingsCollapseMisc.UseGamePostExitCommand = value; + } + } + + public string PostExitCommand + { + get => Settings.SettingsCollapseMisc.GamePostExitCommand; + set => Settings.SettingsCollapseMisc.GamePostExitCommand = value; + } + #endregion } } diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/StarRailGameSettingsPage.xaml b/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/StarRailGameSettingsPage.xaml new file mode 100644 index 000000000..5cf0bcc1f --- /dev/null +++ b/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/StarRailGameSettingsPage.xaml @@ -0,0 +1,891 @@ +<Page + x:Class="CollapseLauncher.Pages.StarRailGameSettingsPage" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:conv="using:CollapseLauncher.Pages" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:helper="using:Hi3Helper" + xmlns:local="using:CollapseLauncher" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:settype="using:CollapseLauncher.GameSettings" + xmlns:static="using:CollapseLauncher.GameSettings.StarRail" + Loaded="InitializeSettings" + Unloaded="OnUnload" + mc:Ignorable="d"> + <Page.Resources> + <ThemeShadow x:Name="SharedShadow" /> + <conv:InverseBooleanConverter x:Key="BooleanInverse" /> + </Page.Resources> + <Grid> + <Grid x:Name="PageContent"> + <ScrollViewer VerticalScrollBarVisibility="Auto"> + <StackPanel Margin="32,40,32,32" Padding="0,0,0,74"> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource TitleLargeTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_Title}" /> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0" Margin="0,0,32,0"> + <StackPanel x:Name="GameResolutionPanel" Margin="0,16"> + <StackPanel> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ResolutionPanel}" /> + <StackPanel + x:Name="GameResolutionWindow" + Margin="0,0,0,8" + Orientation="Vertical"> + <Grid> + <Border + x:Name="VSyncTooltip" + Background="Transparent" + ToolTipService.ToolTip="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_VSync_Help}" + /> + <CheckBox + x:Name="VSyncToggle" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_VSync}" + IsChecked="{x:Bind EnableVSync, Mode=TwoWay}" /> + </Grid> + <CheckBox + x:Name="GameResolutionFullscreen" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_Fullscreen}" + IsChecked="{x:Bind IsFullscreenEnabled, Mode=TwoWay}" /> + <CheckBox + x:Name="GameResolutionBorderless" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Borderless}" + IsChecked="{x:Bind IsBorderlessEnabled, Mode=TwoWay}" /> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + </Grid.ColumnDefinitions> + <CheckBox + x:Name="GameWindowResizable" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResizableWindow}" + IsChecked="{x:Bind IsResizableWindow, Mode=TwoWay}" + IsEnabled="{x:Bind IsCanResizableWindow, Mode=OneWay}" /> + <Button + Grid.Column="1" + Margin="8,-4,0,0" + Style="{ThemeResource ButtonRevealStyle}"> + <Button.Content> + <FontIcon + FontFamily="{ThemeResource FontAwesome}" + FontSize="12" + Glyph="?" /> + </Button.Content> + <Button.Flyout> + <Flyout AllowFocusOnInteraction="True"> + <TextBlock + MaxWidth="360" + FontWeight="SemiBold" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResizableWindowTooltip}" + TextAlignment="Center" + TextWrapping="Wrap" /> + </Flyout> + </Button.Flyout> + </Button> + </Grid> + <!-- + Exclusive Fullscreen option is disabled in Honkai:Star Rail due to it being ignored by the game + Delete `Visibility="Collapsed"' to revert this change + --> + <CheckBox + x:Name="GameResolutionFullscreenExclusive" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ExclusiveFullscreen}" + IsChecked="{x:Bind IsExclusiveFullscreenEnabled, Mode=TwoWay}" + IsEnabled="{x:Bind IsCanExclusiveFullscreen, Mode=OneWay}" + Visibility="Collapsed" /> + </StackPanel> + <StackPanel Margin="0,0,0,16" Orientation="Horizontal"> + <ComboBox + x:Name="GameResolutionSelector" + Width="128" + CornerRadius="14" + IsEnabled="{x:Bind IsCustomResolutionEnabled, Mode=OneWay, Converter={StaticResource BooleanInverse}}" + PlaceholderText="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ResSelectPlaceholder}" + SelectedItem="{x:Bind ResolutionSelected, Mode=TwoWay}" /> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + </Grid.ColumnDefinitions> + <CheckBox + x:Name="GameCustomResolutionCheckbox" + Margin="16,0,0,0" + VerticalAlignment="Center" + Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ResCustom}" + IsChecked="{x:Bind IsCustomResolutionEnabled, Mode=TwoWay}" + IsEnabled="{x:Bind IsCanCustomResolution, Mode=OneWay}" /> + <Button + Grid.Column="1" + Margin="8,-4,0,0" + Style="{ThemeResource ButtonRevealStyle}"> + <Button.Content> + <FontIcon + FontFamily="{ThemeResource FontAwesome}" + FontSize="12" + Glyph="?" /> + </Button.Content> + <Button.Flyout> + <Flyout AllowFocusOnInteraction="True"> + <TextBlock + MaxWidth="360" + FontWeight="SemiBold" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ResCustomTooltip}" + TextAlignment="Center" + TextWrapping="Wrap" /> + </Flyout> + </Button.Flyout> + </Button> + </Grid> + </StackPanel> + </StackPanel> + <StackPanel x:Name="GameCustomResolutionPanel" Orientation="Horizontal"> + <TextBlock + Margin="0,0,8,0" + VerticalAlignment="Center" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ResCustomW}" /> + <NumberBox + x:Name="GameCustomResolutionWidth" + Width="100" + HorizontalAlignment="Left" + CornerRadius="8,8,0,0" + IsEnabled="{x:Bind IsCanResolutionWH, Mode=OneWay}" + Value="{x:Bind ResolutionW, Mode=TwoWay}" /> + <TextBlock + Margin="16,0,8,0" + VerticalAlignment="Center" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ResCustomH}" /> + <NumberBox + x:Name="GameCustomResolutionHeight" + Width="100" + HorizontalAlignment="Left" + CornerRadius="8,8,0,0" + IsEnabled="{x:Bind IsCanResolutionWH, Mode=OneWay}" + Value="{x:Bind ResolutionH, Mode=TwoWay}" /> + </StackPanel> + <TextBlock + Margin="0,16,8,0" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_FPS}" /> + <TextBlock + Margin="0,4,0,0" + Style="{ThemeResource CaptionTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_FPS_Help}" /> + <TextBlock + Margin="0,4,0,8" + Style="{ThemeResource CaptionTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_FPS_Help2}" /> + <ComboBox + x:Name="FPSSelector" + Width="128" + Margin="0,8,0,0" + CornerRadius="14" + ItemsSource="{x:Bind static:Model.FPSIndex}" + SelectedIndex="{x:Bind FPS, Mode=TwoWay}" /> + </StackPanel> + <StackPanel x:Name="GameBoostPanel" Orientation="Horizontal"> + <ToggleSwitch + Margin="4,0,0,8" + Header="{x:Bind helper:Locale.Lang._GameSettingsPage.GameBoost}" + IsOn="{x:Bind IsGameBoost, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + </StackPanel> + </StackPanel> + <StackPanel + x:Name="StarRailGameGraphicsPanel" + Grid.Column="1" + Margin="0,16"> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_SpecPanel}" /> + <StackPanel> + <StackPanel Grid.Column="0" Margin="0,0,56,8"> + <Grid x:Name="RenderScaleGrid"> + <TextBlock Style="{ThemeResource BodyStrongTextBlockStyle}" Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_RenderScale}" /> + <TextBlock + HorizontalAlignment="Right" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{Binding Value, ElementName=RenderScaleSlider}" /> + </Grid> + <Slider + x:Name="RenderScaleSlider" + Maximum="2.0" + Minimum="0.6" + StepFrequency="0.2" + TickFrequency="0.2" + TickPlacement="Outside" + Value="{x:Bind RenderScale, Mode=TwoWay}" /> + </StackPanel> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0"> + <TextBlock + Margin="0,0,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ShadowQuality}" /> + <ComboBox + x:Name="ShadowQualitySelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind ShadowQuality, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}" /> + <ComboBoxItem + Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryLow}" + IsEnabled="False" + Visibility="Collapsed" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecHigh}" /> + <ComboBoxItem + Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryHigh}" + IsEnabled="False" + Visibility="Collapsed" /> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="1"> + <TextBlock + Margin="0,0,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_LightQuality}" /> + <ComboBox + x:Name="LightQualitySelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind LightQuality, Mode=TwoWay}"> + <ComboBoxItem + Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}" + IsEnabled="False" + Visibility="Collapsed" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecHigh}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryHigh}" /> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="2"> + <TextBlock + Margin="0,0,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_CharacterQuality}" /> + <ComboBox + x:Name="CharacterQualitySelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind CharacterQuality, Mode=TwoWay}"> + <!-- dum workaround for the dum enum --> + <ComboBoxItem + Content="0" + IsEnabled="False" + Visibility="Collapsed" /> + <ComboBoxItem + Content="1" + IsEnabled="False" + Visibility="Collapsed" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecHigh}" /> + </ComboBox> + </StackPanel> + </Grid> + </StackPanel> + <StackPanel> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0"> + <TextBlock + Margin="0,8,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_EnvDetailQuality}" /> + <ComboBox + x:Name="EnvDetailQualitySelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind EnvDetailQuality, Mode=TwoWay}"> + <ComboBoxItem + Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}" + IsEnabled="False" + Visibility="Collapsed" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecHigh}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryHigh}" /> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="1"> + <TextBlock + Margin="0,8,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ReflectionQuality}" /> + <ComboBox + x:Name="ReflectionQualitySelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind ReflectionQuality, Mode=TwoWay}"> + <ComboBoxItem + Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}" + IsEnabled="False" + Visibility="Collapsed" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecHigh}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryHigh}" /> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="2"> + <TextBlock + Margin="0,8,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_BloomQuality}" /> + <ComboBox + x:Name="BloomQualitySelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind BloomQuality, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecHigh}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryHigh}" /> + </ComboBox> + </StackPanel> + </Grid> + </StackPanel> + <StackPanel> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0"> + <TextBlock + Margin="0,8,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_AAMode}" /> + <ComboBox + x:Name="AAModeSelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind AAMode, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}" /> + <ComboBoxItem Content="TAA" /> + <ComboBoxItem Content="FXAA" /> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="1"> + <TextBlock + Margin="0,8,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ResolutionQuality}" /> + <ComboBox + x:Name="ResolutionQualitySelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind ResolutionQuality, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecHigh}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryHigh}" /> + </ComboBox> + </StackPanel> + <StackPanel Grid.Column="2"> + <TextBlock + Margin="0,8,0,8" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_SFXQuality}" /> + <ComboBox + x:Name="SFXQualitySelector" + Width="128" + Margin="0,0,0,8" + CornerRadius="14" + SelectedIndex="{x:Bind SFXQuality, Mode=TwoWay}"> + <ComboBoxItem + Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}" + IsEnabled="False" + Visibility="Collapsed" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecLow}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecMedium}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecHigh}" /> + <ComboBoxItem + Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryHigh}" + IsEnabled="False" + Visibility="Collapsed" /> + </ComboBox> + </StackPanel> + </Grid> + </StackPanel> + </StackPanel> + </Grid> + <MenuFlyoutSeparator Margin="0,4,0,8" /> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource TitleLargeTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Audio_Title}" /> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <StackPanel Grid.Column="0"> + <StackPanel x:Name="AudioSettingsPanelLeft" Margin="0,16,64,16"> + <StackPanel> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Audio_Master}" /> + <StackPanel Margin="0,0,32,8" Orientation="Vertical"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="40px" /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <TextBlock + VerticalAlignment="Center" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{Binding Value, ElementName=AudioMasterVolumeSlider}" /> + <Slider + x:Name="AudioMasterVolumeSlider" + Grid.Column="1" + Maximum="10" + TickFrequency="1" + TickPlacement="Outside" + Value="{x:Bind AudioMasterVolume, Mode=TwoWay}" /> + </Grid> + </StackPanel> + <TextBlock + Margin="0,16,0,16" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Audio_SFX}" /> + <StackPanel Margin="0,0,32,8" Orientation="Vertical"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="40px" /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <TextBlock + VerticalAlignment="Center" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{Binding Value, ElementName=AudioSFXVolumeSlider}" /> + <Slider + x:Name="AudioSFXVolumeSlider" + Grid.Column="1" + Maximum="10" + TickFrequency="1" + TickPlacement="Outside" + Value="{x:Bind AudioSFXVolume, Mode=TwoWay}" /> + </Grid> + </StackPanel> + </StackPanel> + </StackPanel> + </StackPanel> + <StackPanel Grid.Column="1"> + <StackPanel x:Name="AudioSettingsPanelRight" Margin="0,16,64,16"> + <StackPanel> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Audio_BGM}" /> + <StackPanel Margin="0,0,32,8" Orientation="Vertical"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="40px" /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <TextBlock + VerticalAlignment="Center" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{Binding Value, ElementName=AudioBGMVolumeSlider}" /> + <Slider + x:Name="AudioBGMVolumeSlider" + Grid.Column="1" + Maximum="10" + TickFrequency="1" + TickPlacement="Outside" + Value="{x:Bind AudioBGMVolume, Mode=TwoWay}" /> + </Grid> + </StackPanel> + <TextBlock + Margin="0,16,0,16" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Audio_VO}" /> + <StackPanel Margin="0,0,32,8" Orientation="Vertical"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="40px" /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <TextBlock + VerticalAlignment="Center" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{Binding Value, ElementName=AudioVOVolumeSlider}" /> + <Slider + x:Name="AudioVOVolumeSlider" + Grid.Column="1" + Maximum="10" + TickFrequency="1" + TickPlacement="Outside" + Value="{x:Bind AudioVOVolume, Mode=TwoWay}" /> + </Grid> + </StackPanel> + </StackPanel> + </StackPanel> + </StackPanel> + </Grid> + <MenuFlyoutSeparator Margin="0,4,0,8" /> + + <StackPanel> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource TitleLargeTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Language}" /> + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="Auto" /> + <RowDefinition Height="*" /> + </Grid.RowDefinitions> + <Grid.ColumnDefinitions> + <ColumnDefinition /> + <ColumnDefinition /> + </Grid.ColumnDefinitions> + <TextBlock + Grid.Row="0" + Margin="0,0,0,16" + TextWrapping="Wrap"> + <Run Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Language_Help1}" /> + <LineBreak /> + <Run Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Language_Help2}" /> + </TextBlock> + <Grid Grid.Row="1"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="200" /> + <ColumnDefinition Width="200" /> + </Grid.ColumnDefinitions> + <StackPanel + x:Name="LangSettingLeft" + Grid.Column="0" + Margin="0,0,24,0"> + <TextBlock + Margin="0,0,0,8" + FontSize="16" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.LanguageAudio}" /> + <ComboBox + x:Name="AudioLangSelector" + Margin="-4,0,0,16" + HorizontalAlignment="Stretch" + CornerRadius="14" + SelectedIndex="{x:Bind AudioLang, Mode=TwoWay}"> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.VO_en}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.VO_jp}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.VO_cn}" /> + <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.VO_kr}" /> + </ComboBox> + </StackPanel> + <StackPanel + x:Name="LangSettingRight" + Grid.Column="1" + Margin="0,0,24,0"> + <TextBlock + Margin="0,0,0,8" + FontSize="16" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.LanguageText}" /> + <ComboBox + x:Name="TextLangSelector" + Margin="-4,0,0,16" + HorizontalAlignment="Stretch" + CornerRadius="14" + MaxDropDownHeight="200" + SelectedIndex="{x:Bind TextLang, Mode=TwoWay}"> + <ComboBoxItem Content="English" /> + <ComboBoxItem Content="日本語" /> + <ComboBoxItem Content="简体中文" /> + <ComboBoxItem Content="繁體中文" /> + <ComboBoxItem Content="한국어" /> + <ComboBoxItem Content="Español" /> + <ComboBoxItem Content="Русский" /> + <ComboBoxItem Content="ภาษาไทย" /> + <ComboBoxItem Content="Tiếng Việt" /> + <ComboBoxItem Content="Bahasa Indonesia" /> + <ComboBoxItem Content="Français" /> + <ComboBoxItem Content="Deutsch" /> + <ComboBoxItem Content="Português" /> + </ComboBox> + </StackPanel> + </Grid> + </Grid> + </StackPanel> + <MenuFlyoutSeparator Margin="0,4,0,8" /> + <TextBlock + Margin="0,0,0,16" + Style="{ThemeResource TitleLargeTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.CustomArgs_Title}" /> + <TextBlock + Margin="0,0,0,0" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.CustomArgs_Subtitle}" /> + <ToggleSwitch + Margin="0,0,0,16" + IsOn="{x:Bind IsUseCustomArgs, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + <TextBox + x:Name="CustomArgsTextBox" + Margin="0,0,0,16" + HorizontalAlignment="Stretch" + CornerRadius="8,8,0,0" + Text="{x:Bind CustomArgsValue, Mode=TwoWay}" /> + <TextBlock Height="Auto" TextWrapping="WrapWholeWords"> + <Run Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.CustomArgs_Footer1}" /> + <Hyperlink NavigateUri="https://docs.unity3d.com/Manual/PlayerCommandLineArguments.html" UnderlineStyle="None"> + <Run FontWeight="Bold" Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.CustomArgs_Footer2}" /> + </Hyperlink> + <Run Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.CustomArgs_Footer3}" /> + </TextBlock> + <MenuFlyoutSeparator Margin="0,16,0,16" /> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + </Grid.ColumnDefinitions> + <TextBlock + Grid.Column="0" + Margin="0,0,8,0" + VerticalAlignment="Stretch" + Style="{ThemeResource TitleLargeTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_Title}" /> + <ToggleSwitch + Grid.Column="1" + Margin="8,12,0,8" + VerticalAlignment="Stretch" + VerticalContentAlignment="Stretch" + FontSize="26" + FontWeight="SemiBold" + IsOn="{x:Bind IsUseAdvancedSettings, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + </Grid> + <StackPanel x:Name="AdvancedSettingsPanel" Visibility="Collapsed"> + <TextBlock Margin="0,0,0,8" TextWrapping="WrapWholeWords"> + <Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_Subtitle1}" /> + <Run FontWeight="Bold" Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_Subtitle2}" /> + <Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_Subtitle3}" /> + </TextBlock> + <TextBlock + Margin="0,0,8,8" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_PreLaunch_Title}" /> + <ToggleSwitch + Margin="0,0,0,0" + Header="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_PreLaunch_Subtitle}" + IsOn="{x:Bind IsUsePreLaunchCommand, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + <ToggleSwitch + x:Name="PreLaunchForceCloseToggle" + Margin="0,0,0,8" + Header="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_PreLaunch_Exit}" + IsOn="{x:Bind IsPreLaunchCommandExitOnGameClose, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + <TextBox + x:Name="PreLaunchCommandTextBox" + Margin="0,0,0,4" + HorizontalAlignment="Stretch" + CornerRadius="8,8,0,0" + Text="{x:Bind PreLaunchCommand, Mode=TwoWay}" /> + <TextBlock + Margin="0,0,0,8" + FontWeight="Semibold" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_WarningAdmin}" /> + <TextBlock + Margin="0,0,8,8" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_PostExit_Title}" /> + <ToggleSwitch + Margin="0,0,0,8" + Header="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_PostExit_Subtitle}" + IsOn="{x:Bind IsUsePostExitCommand, Mode=TwoWay}" + OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" + OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" /> + <TextBox + x:Name="PostExitCommandTextBox" + Margin="0,0,0,4" + HorizontalAlignment="Stretch" + CornerRadius="8,8,0,0" + Text="{x:Bind PostExitCommand, Mode=TwoWay}" /> + <TextBlock + Margin="0,0,0,16" + FontWeight="Semibold" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_GLC_WarningAdmin}" /> + </StackPanel> + </StackPanel> + </ScrollViewer> + <Grid + x:Name="GameSettingsApplyGrid" + Margin="16" + Padding="16,16" + HorizontalAlignment="Stretch" + VerticalAlignment="Bottom" + Background="{ThemeResource GameSettingsApplyGridBrush}" + CornerRadius="8" + Shadow="{ThemeResource SharedShadow}"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition /> + <ColumnDefinition Width="Auto" /> + </Grid.ColumnDefinitions> + <Button + x:Name="ApplyButton" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Click="ApplyButton_Click" + CornerRadius="16" + IsEnabled="True" + Shadow="{ThemeResource SharedShadow}" + Style="{ThemeResource AccentButtonStyle}"> + <StackPanel Margin="8,0" Orientation="Horizontal"> + <FontIcon + FontFamily="{ThemeResource FontAwesomeSolid}" + FontSize="14" + Glyph="" /> + <TextBlock + Margin="8,0,0,0" + FontWeight="Medium" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.ApplyBtn}" /> + </StackPanel> + </Button> + <TextBlock + x:Name="ApplyText" + Grid.Column="1" + Margin="16,-4,0,0" + HorizontalAlignment="Stretch" + VerticalAlignment="Center" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.SettingsApplied}" + TextWrapping="Wrap" + Visibility="Collapsed" /> + <StackPanel + Grid.Column="2" + HorizontalAlignment="Right" + Orientation="Horizontal"> + <TextBlock + Margin="16,-4,16,0" + VerticalAlignment="Center" + FontWeight="Medium" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportExport}" /> + <Button + x:Name="RegistryExport" + Height="32" + Click="RegistryExportClick" + CornerRadius="16,0,0,16" + Shadow="{ThemeResource SharedShadow}" + Style="{ThemeResource AccentButtonStyle}" + ToolTipService.ToolTip="{x:Bind helper:Locale.Lang._GameSettingsPage.RegExportTooltip}"> + <StackPanel Margin="8,0" Orientation="Horizontal"> + <FontIcon + FontFamily="{ThemeResource FontAwesomeSolid}" + FontSize="14" + Glyph="" /> + <TextBlock + Margin="8,0,0,0" + FontWeight="Medium" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegExportTitle}" /> + </StackPanel> + </Button> + <Button + x:Name="RegistryImport" + Height="32" + Click="RegistryImportClick" + CornerRadius="0,16,16,0" + Shadow="{ThemeResource SharedShadow}" + Style="{ThemeResource AccentButtonStyle}" + ToolTipService.ToolTip="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportTooltip}"> + <StackPanel Margin="8,0" Orientation="Horizontal"> + <TextBlock + Margin="0,0,8,0" + FontWeight="Medium" + Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportTitle}" /> + <FontIcon + FontFamily="{ThemeResource FontAwesomeSolid}" + FontSize="14" + Glyph="" /> + </StackPanel> + </Button> + </StackPanel> + </Grid> + </Grid> + <Grid x:Name="Overlay" Visibility="Collapsed"> + <StackPanel + Margin="0,176,0,0" + HorizontalAlignment="Center" + VerticalAlignment="Center" + Orientation="Vertical"> + <ProgressRing + x:Name="Ring" + Width="48" + Height="48" + Margin="32" + IsActive="True" + IsIndeterminate="false" + Maximum="100" + Value="100" /> + <TextBlock + x:Name="OverlayTitle" + HorizontalAlignment="Center" + VerticalAlignment="Center" + Style="{ThemeResource SubtitleTextBlockStyle}" + Text="Title" /> + <TextBlock + x:Name="OverlaySubtitle" + Margin="0,8,0,192" + HorizontalAlignment="Center" + VerticalAlignment="Center" + Style="{ThemeResource BodyStrongTextBlockStyle}" + Text="Subtitle" /> + </StackPanel> + </Grid> + </Grid> +</Page> \ No newline at end of file diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/StarRailGameSettingsPage.xaml.cs b/CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/StarRailGameSettingsPage.xaml.cs similarity index 100% rename from CollapseLauncher/XAMLs/MainApp/Pages/StarRailGameSettingsPage.xaml.cs rename to CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/StarRailGameSettingsPage.xaml.cs diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/GenshinGameSettingsPage.xaml b/CollapseLauncher/XAMLs/MainApp/Pages/GenshinGameSettingsPage.xaml deleted file mode 100644 index 14ab85fdf..000000000 --- a/CollapseLauncher/XAMLs/MainApp/Pages/GenshinGameSettingsPage.xaml +++ /dev/null @@ -1,603 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Page - x:Class="CollapseLauncher.Pages.GenshinGameSettingsPage" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:CollapseLauncher" - xmlns:helper="using:Hi3Helper" - xmlns:conv="using:CollapseLauncher.Pages" - xmlns:settype="using:CollapseLauncher.GameSettings" - xmlns:static="using:CollapseLauncher.GameSettings.Genshin" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:f="using:Windows.Globalization.NumberFormatting" - xmlns:xaml="using:Microsoft.Graphics.Canvas.UI.Xaml" - xmlns:controls="using:CommunityToolkit.WinUI.Controls" - mc:Ignorable="d" - Loaded="InitializeSettings" Unloaded="OnUnload"> - <Page.Resources> - <ThemeShadow x:Name="SharedShadow"/> - <conv:InverseBooleanConverter x:Key="BooleanInverse"/> - <f:DecimalFormatter x:Key="DecimalFormatter" SignificantDigits="5"/> - <conv:BooleanVisibilityConverter x:Key="BooleanVisibilityConverter"/> - <conv:InverseBooleanVisibilityConverter x:Key="InverseBooleanVisibilityConverter"/> - </Page.Resources> - <Grid> - <Grid x:Name="PageContent"> - <ScrollViewer VerticalScrollBarVisibility="Auto"> - <StackPanel Margin="32,40,32,32" Padding="0,0,0,74"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_Title}" Style="{ThemeResource TitleLargeTextBlockStyle}" Margin="0,0,0,16"/> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0"> - <StackPanel x:Name="GameResolutionPanel" Margin="0,0"> - <StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ResolutionPanel}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,0,0,16"/> - <StackPanel x:Name="GameResolutionWindow" Orientation="Vertical" Margin="0,0,0,8"> - <CheckBox x:Name="VSyncToggle" Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_VSync}" HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="{x:Bind VerticalSync, Mode=TwoWay}"/> - <CheckBox x:Name="GameResolutionFullscreen" Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_Fullscreen}" - HorizontalAlignment="Left" VerticalAlignment="Center" - IsChecked="{x:Bind IsFullscreenEnabled, Mode=TwoWay}"/> - <CheckBox x:Name="GameResolutionBorderless" Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Borderless}" - HorizontalAlignment="Left" VerticalAlignment="Center" - IsChecked="{x:Bind IsBorderlessEnabled, Mode=TwoWay}"/> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="Auto"/> - <ColumnDefinition Width="Auto"/> - </Grid.ColumnDefinitions> - <CheckBox x:Name="GameWindowResizable" Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResizableWindow}" - HorizontalAlignment="Left" VerticalAlignment="Center" - IsEnabled="{x:Bind IsCanResizableWindow, Mode=OneWay}" - IsChecked="{x:Bind IsResizableWindow, Mode=TwoWay}"/> - <Button Grid.Column="1" Margin="8,-4,0,0" Style="{ThemeResource ButtonRevealStyle}"> - <Button.Content> - <FontIcon - FontFamily="{ThemeResource FontAwesome}" - FontSize="12" - Glyph="?" /> - </Button.Content> - <Button.Flyout> - <Flyout AllowFocusOnInteraction="True"> - <TextBlock - Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResizableWindowTooltip}" - MaxWidth="360" - TextWrapping="Wrap" - TextAlignment="Center" - FontWeight="SemiBold"/> - </Flyout> - </Button.Flyout> - </Button> - </Grid> - <!-- - Exclusive Fullscreen option is disabled for Genshin due to the amount of bugs it caused - Ref: https://www.pcgamingwiki.com/wiki/Genshin_Impact#G-Sync_.2F_Variable_Refresh_Rate_Does_Not_Work - Delete `Visibility="Collapsed"' to revert this change - --> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ExclusiveFullscreen_Help}" Visibility="Collapsed" Margin="28,0,0,0"/> - <CheckBox x:Name="GameResolutionFullscreenExclusive" Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ExclusiveFullscreen}" - HorizontalAlignment="Left" VerticalAlignment="Center" - IsEnabled="{x:Bind IsCanExclusiveFullscreen, Mode=OneWay}" Visibility="Collapsed" - IsChecked="{x:Bind IsExclusiveFullscreenEnabled, Mode=TwoWay}"/> - </StackPanel> - <StackPanel Orientation="Horizontal" Margin="0,0,0,16"> - <ComboBox CornerRadius="14" x:Name="GameResolutionSelector" - PlaceholderText="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ResSelectPlaceholder}" Width="128" - IsEnabled="{x:Bind IsCustomResolutionEnabled, Mode=OneWay, Converter={StaticResource BooleanInverse}}" - SelectedItem="{x:Bind ResolutionSelected, Mode=TwoWay}"/> - <CheckBox x:Name="GameCustomResolutionCheckbox" Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ResCustom}" - VerticalAlignment="Center" Margin="16,0,0,0" - IsEnabled="{x:Bind IsExclusiveFullscreenEnabled, Mode=OneWay, Converter={StaticResource BooleanInverse}}" - IsChecked="{x:Bind IsCustomResolutionEnabled, Mode=TwoWay}"/> - </StackPanel> - </StackPanel> - <StackPanel x:Name="GameCustomResolutionPanel" Orientation="Horizontal"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ResCustomW}" VerticalAlignment="Center" Margin="0,0,8,0"/> - <NumberBox CornerRadius="8,8,0,0" x:Name="GameCustomResolutionWidth" Value="{x:Bind ResolutionW, Mode=TwoWay}" - IsEnabled="{x:Bind IsCanResolutionWH, Mode=OneWay}" - HorizontalAlignment="Left" Width="100"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ResCustomH}" VerticalAlignment="Center" Margin="16,0,8,0"/> - <NumberBox CornerRadius="8,8,0,0" x:Name="GameCustomResolutionHeight" Value="{x:Bind ResolutionH, Mode=TwoWay}" - IsEnabled="{x:Bind IsCanResolutionWH, Mode=OneWay}" - HorizontalAlignment="Left" Width="100"/> - </StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_FPS}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,16,8,0"/> - <ComboBox x:Name="FPSSelector" SelectedIndex="{x:Bind FPS, Mode=TwoWay}" ItemsSource="{x:Bind static:GlobalPerfData.FPSIndex}" Margin="0,8,0,8" Width="128" CornerRadius="14"/> - </StackPanel> - <StackPanel x:Name="GameBoostPanel" Orientation="Horizontal"> - <ToggleSwitch Header="{x:Bind helper:Locale.Lang._GameSettingsPage.GameBoost}" OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" IsOn="{x:Bind IsGameBoost, Mode=TwoWay}" Margin="4,8,0,0"/> - </StackPanel> - <StackPanel x:Name="HDRSettings" Orientation="Vertical"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,8,8,8"/> - <Expander Margin="0,0,0,8" MinWidth="400" MaxWidth="700" HorizontalContentAlignment="Stretch" CornerRadius="8" x:Name="HDRExpander" Expanding="HDRExpander_OnExpanding"> - <Expander.Header> - <Grid> - <CheckBox x:Name="HDRCheckBox" IsChecked="{x:Bind IsHDR, Mode=TwoWay}" IsEnabled="{x:Bind IsHDREnabled}"> - <CheckBox.Content> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_Enable}" Style="{ThemeResource BodyStrongTextBlockStyle}"/> - </CheckBox.Content> - </CheckBox> - <Button HorizontalAlignment="Right" Height="30" Width="30" CornerRadius="4" Padding="0"> - <Button.Content> - <FontIcon FontFamily="{ThemeResource FontAwesome}" HorizontalAlignment="Center" Glyph="?" FontSize="10"/> - </Button.Content> - <Button.Flyout> - <Flyout> - <StackPanel> - <StackPanel Visibility="{x:Bind IsHDREnabled, Converter={StaticResource InverseBooleanVisibilityConverter}}"> - <TextBlock Style="{ThemeResource BaseTextBlockStyle}" Visibility="{x:Bind IsHDRSupported, Converter={StaticResource InverseBooleanVisibilityConverter}}"> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_NotSupported1}"/><LineBreak/> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_NotSupported2}"/><LineBreak/> - </TextBlock> - <TextBlock Style="{ThemeResource BaseTextBlockStyle}" Visibility="{x:Bind IsHDRSupported, Converter={StaticResource BooleanVisibilityConverter}}"> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_NotEnabled1}"/><LineBreak/> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_NotEnabled2}"/><LineBreak/> - </TextBlock> - <TextBlock> - <Hyperlink NavigateUri="https://support.microsoft.com/windows/2d767185-38ec-7fdc-6f97-bbc6c5ef24e6"> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_Help_Link}"/> - </Hyperlink> - </TextBlock> - </StackPanel> - <StackPanel Visibility="{x:Bind IsHDREnabled, Converter={StaticResource BooleanVisibilityConverter}}"> - <RichTextBlock Style="{ThemeResource BodyRichTextBlockStyle}" TextAlignment="Left" IsTextSelectionEnabled="False"> - <Paragraph FontWeight="SemiBold"> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_MaxLuminosity}"/> - </Paragraph> - <Paragraph FontSize="13"> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_MaxLuminosity_Help}"/><LineBreak/> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_Calibration_Help}"/> - </Paragraph> - <Paragraph FontSize="2"/> - <Paragraph FontWeight="SemiBold"> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_UiBrightness}"/> - </Paragraph> - <Paragraph FontSize="13"> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_UiBrightness_Help}"/> - </Paragraph> - <Paragraph FontSize="2"/> - <Paragraph FontWeight="SemiBold"> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_SceneBrightness}"/> - </Paragraph> - <Paragraph FontSize="13"> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_SceneBrightness_Help}"/> - </Paragraph> - </RichTextBlock> - </StackPanel> - </StackPanel> - </Flyout> - </Button.Flyout> - </Button> - </Grid> - </Expander.Header> - <Expander.Content> - <StackPanel Padding="10"> - <xaml:CanvasSwapChainPanel x:Name="HDRCalibrationPanel1" Width="360" Height="203" Loaded="SwapChainPanel1_OnLoaded" Margin="0,0,0,8"/> - <Grid> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_MaxLuminosity}" Style="{ThemeResource BodyStrongTextBlockStyle}" VerticalAlignment="Center"/> - <NumberBox x:Name="MaxLuminosityValue" HorizontalAlignment="Right" Minimum="300.0" Maximum="2000.0" NumberFormatter="{StaticResource DecimalFormatter}" CornerRadius="8,8,0,0" Margin="0,0,0,0" ValueChanged="MaxLuminosityValue_ValueChanged"/> - </Grid> - <Slider x:Name="MaxLuminositySlider" Minimum="300.0" Maximum="2000.0" HorizontalAlignment="Center" MinWidth="350" MaxWidth="514" StepFrequency="50" TickFrequency="100" TickPlacement="Outside" IsThumbToolTipEnabled="False" Value="{x:Bind MaxLuminosity,Mode=TwoWay}" ValueChanged="MaxLuminositySlider_ValueChanged" Margin="0,0,0,4"/> - <xaml:CanvasSwapChainPanel x:Name="HDRCalibrationPanel2" Width="360" Height="203" Loaded="SwapChainPanel2_OnLoaded" Margin="0,0,0,8"/> - <Grid> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_SceneBrightness}" Style="{ThemeResource BodyStrongTextBlockStyle}" VerticalAlignment="Center"/> - <NumberBox x:Name="ScenePaperWhiteValue" HorizontalAlignment="Right" Minimum="100.0" Maximum="500.0" NumberFormatter="{StaticResource DecimalFormatter}" CornerRadius="8,8,0,0" Margin="0,0,0,0" ValueChanged="ScenePaperWhiteValue_ValueChanged"/> - </Grid> - <Slider x:Name="ScenePaperWhiteSlider" Minimum="100.0" Maximum="500.0" HorizontalAlignment="Center" MinWidth="350" StepFrequency="5" TickFrequency="25" TickPlacement="Outside" IsThumbToolTipEnabled="False" Value="{x:Bind ScenePaperWhite, Mode=TwoWay}" ValueChanged="ScenePaperWhiteSlider_ValueChanged"/> - <Grid> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_HDR_UiBrightness}" Style="{ThemeResource BodyStrongTextBlockStyle}" VerticalAlignment="Center"/> - <NumberBox x:Name="UiPaperWhiteValue" HorizontalAlignment="Right" VerticalAlignment="Center" Minimum="150.0" Maximum="550.0" NumberFormatter="{StaticResource DecimalFormatter}" CornerRadius="8,8,0,0" Margin="0,0,0,0" Height="32" ValueChanged="UiPaperWhiteValue_ValueChanged"/> - </Grid> - <Slider x:Name="UiPaperWhiteSlider" Minimum="150.0" Maximum="550.0" HorizontalAlignment="Center" MinWidth="350" StepFrequency="5" TickFrequency="25" TickPlacement="Outside" IsThumbToolTipEnabled="False" Value="{x:Bind UiPaperWhite, Mode=TwoWay}" ValueChanged="UiPaperWhiteSlider_ValueChanged" Margin="0,0,0,4"/> - </StackPanel> - </Expander.Content> - </Expander> - </StackPanel> - </StackPanel> - <StackPanel x:Name="GenshinGameGraphicsPanel" Margin="0,0" Grid.Column="1"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_SpecPanel}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,0,0,16"/> - <StackPanel> - <StackPanel> - <Grid x:Name="GammaGrid"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_Gamma}" Style="{ThemeResource BodyStrongTextBlockStyle}"/> - <NumberBox x:Name="GammaValue" Minimum="1.4" Maximum="3.0" HorizontalAlignment="Right" Width="110" ValueChanged="GammaValue_ValueChanged" NumberFormatter="{StaticResource DecimalFormatter}" CornerRadius="8,8,0,0" Margin="0,0,28,0"/> - </Grid> - <Slider x:Name="GammaSlider" Minimum="1.4" Maximum="3.0" Value="{x:Bind Gamma, Mode=TwoWay}" TickFrequency="0.2" StepFrequency="0.000001" TickPlacement="Outside" Margin="0,0,28,8" IsThumbToolTipEnabled="False" ValueChanged="GammaSlider_ValueChanged"/> - </StackPanel> - <StackPanel> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_RenderScale}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="RenderScaleSelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind RenderScale, Mode=TwoWay}" ItemsSource="{x:Bind static:GlobalPerfData.RenderScaleValuesStr}"/> - </StackPanel> - <StackPanel Grid.Column="1"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_AAMode}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="AntialiasingSelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind Antialiasing, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecDisabled}"/> - <ComboBoxItem Content="FSR 2"/> - <ComboBoxItem Content="SMAA"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="2"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_AnisotropicFiltering}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="AnisotropicFilteringSelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind AnisotropicFiltering, Mode=TwoWay}"> - <ComboBoxItem Content="1x"/> - <ComboBoxItem Content="2x"/> - <ComboBoxItem Content="4x"/> - <ComboBoxItem Content="8x"/> - <ComboBoxItem Content="16x"/> - </ComboBox> - </StackPanel> - </Grid> - </StackPanel> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ShadowQuality}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,8,0,8"/> - <ComboBox x:Name="ShadowQualitySelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind ShadowQuality, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecVeryLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecHigh}"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="1"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_VisualFX}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,8,0,8"/> - <ComboBox x:Name="VisualEffectsSelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind VisualEffects, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecVeryLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecHigh}"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="2"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_SFXQuality}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,8,0,8"/> - <ComboBox x:Name="SFXQualitySelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind SFXQuality, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecVeryLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecHigh}"/> - </ComboBox> - </StackPanel> - </Grid> - </StackPanel> - <StackPanel> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_EnvDetailQuality}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,8,0,8"/> - <ComboBox x:Name="EnvironmentDetailSelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind EnvironmentDetail, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecVeryLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecHigh}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecVeryHigh}"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="1"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_MotionBlur}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,8,0,8"/> - <ComboBox x:Name="MotionBlurSelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind MotionBlur, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecDisabled}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecHigh}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecExtreme}"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="2"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_CrowdDensity}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,8,0,8"/> - <ComboBox x:Name="CrowdDensitySelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind CrowdDensity, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecHigh}"/> - </ComboBox> - </StackPanel> - </Grid> - </StackPanel> - <StackPanel> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_SubsurfaceScattering}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,8,0,8"/> - <ComboBox x:Name="SubsurfaceScatteringSelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind SubsurfaceScattering, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecDisabled}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecHigh}"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="1"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_TeammateFX}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,8,0,8"/> - <ComboBox x:Name="CoOpTeammateEffectsSelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind CoOpTeammateEffects, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecDisabled}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecPartiallyOff}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecEnabled}"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="2"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_GlobalIllumination}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,8,0,8"/> - <StackPanel Orientation="Horizontal"> - <ComboBox x:Name="GlobalIlluminationSelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind GlobalIllumination, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecDisabled}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecHigh}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.SpecExtreme}"/> - </ComboBox> - <Button Margin="4,-10,0,0" HorizontalAlignment="Center" Height="24" Width="16" CornerRadius="4" Padding="0"> - <Button.Content> - <FontIcon FontFamily="{ThemeResource FontAwesome}" Glyph="?" FontSize="10"/> - </Button.Content> - <Button.Flyout> - <Flyout> - <StackPanel> - <TextBlock Style="{ThemeResource BaseTextBlockStyle}" TextAlignment="Center"> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_GlobalIllumination_Help1}"/><LineBreak/> - <Hyperlink NavigateUri="https://genshin.hoyoverse.com/en/news/detail/112690#:~:text=Minimum%20Specifications%20for%20Global%20Illumination"> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_GlobalIllumination_Help2}"/> - </Hyperlink> - </TextBlock> - </StackPanel> - </Flyout> - </Button.Flyout> - </Button> - </StackPanel> - </StackPanel> - </Grid> - </StackPanel> - <StackPanel Margin="0,8,0,8"> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0"> - <Grid> - <!-- - A workaround for the tooltip not appearing when the checkbox is disabled. - --> - <Border x:Name="VolumetricFogTooltipEnforcer" Background="Transparent" ToolTipService.ToolTip="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_VolFogs_ToolTip}" Visibility="{x:Bind VolumetricFogToggle.IsEnabled, Converter={StaticResource BooleanVisibilityConverter}}"/> - <CheckBox x:Name="VolumetricFogToggle" Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_VolFogs}" HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="{x:Bind VolumetricFog, Mode=TwoWay}"> - </CheckBox> - </Grid> - </StackPanel> - <StackPanel Grid.Column="1" VerticalAlignment="Center"> - <CheckBox x:Name="ReflectionsToggle" Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_ReflectionQuality}" HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="{x:Bind Reflections, Mode=TwoWay}"/> - </StackPanel> - <StackPanel Grid.Column="2" VerticalAlignment="Center"> - <CheckBox x:Name="BloomToggle" Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_BloomQuality}" HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="{x:Bind Bloom, Mode=TwoWay}"/> - </StackPanel> - </Grid> - </StackPanel> - <StackPanel Margin="0,0,0,8"> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0" VerticalAlignment="Center"> - <CheckBox x:Name="TeamPageBackgroundToggle" Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_TeamPageBackground}" HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="{x:Bind TeamPageBackground, Mode=TwoWay}"/> - </StackPanel> - <StackPanel Grid.Column="1" VerticalAlignment="Center"> - <CheckBox x:Name="DynamicCharacterResolutionToggle" Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_DynamicCharacterResolution}" HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="{x:Bind DynamicCharacterResolution, Mode=TwoWay}" ToolTipService.ToolTip="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Graphics_DynamicCharacterResolution_Tooltip}"/> - </StackPanel> - </Grid> - </StackPanel> - </StackPanel> - </Grid> - <MenuFlyoutSeparator Margin="0,4,0,8"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Audio_Title}" Style="{ThemeResource TitleLargeTextBlockStyle}" Margin="0,0,0,16"/> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0"> - <StackPanel x:Name="AudioSettingsPanelLeft" Margin="0,16,64,16"> - <StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Audio_Master}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,0,0,16"/> - <StackPanel Orientation="Vertical" Margin="0,0,32,8"> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="40px"/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" VerticalAlignment="Center" Text="{Binding Value, ElementName=AudioMasterVolumeSlider}"/> - <Slider x:Name="AudioMasterVolumeSlider" Grid.Column="1" TickFrequency="1" Maximum="10" TickPlacement="Outside" - Value="{x:Bind Audio_Global, Mode=TwoWay}"/> - </Grid> - </StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Audio_SFX}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,16,0,16"/> - <StackPanel Orientation="Vertical" Margin="0,0,32,8"> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="40px"/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" VerticalAlignment="Center" Text="{Binding Value, ElementName=AudioSFXVolumeSlider}"/> - <Slider x:Name="AudioSFXVolumeSlider" Grid.Column="1" TickFrequency="1" Maximum="10" TickPlacement="Outside" - Value="{x:Bind Audio_SFX, Mode=TwoWay}"/> - </Grid> - </StackPanel> - </StackPanel> - </StackPanel> - </StackPanel> - <StackPanel Grid.Column="1"> - <StackPanel x:Name="AudioSettingsPanelRight" Margin="0,16,64,16"> - <StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Audio_BGM}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,0,0,16"/> - <StackPanel Orientation="Vertical" Margin="0,0,32,8"> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="40px"/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" VerticalAlignment="Center" Text="{Binding Value, ElementName=AudioBGMVolumeSlider}"/> - <Slider x:Name="AudioBGMVolumeSlider" Grid.Column="1" TickFrequency="1" Maximum="10" TickPlacement="Outside" - Value="{x:Bind Audio_Music, Mode=TwoWay}"/> - </Grid> - </StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Audio_VO}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,16,0,16"/> - <StackPanel Orientation="Vertical" Margin="0,0,32,8"> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="40px"/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" VerticalAlignment="Center" Text="{Binding Value, ElementName=AudioVOVolumeSlider}"/> - <Slider x:Name="AudioVOVolumeSlider" Grid.Column="1" TickFrequency="1" Maximum="10" TickPlacement="Outside" - Value="{x:Bind Audio_Voice, Mode=TwoWay}"/> - </Grid> - </StackPanel> - </StackPanel> - </StackPanel> - </StackPanel> - </Grid> - <StackPanel Margin="0,0,0,8"> - <controls:UniformGrid Columns="3" HorizontalAlignment="Left"> - <StackPanel Grid.Column="0"> - <CheckBox x:Name="AudioDynamicRangeToggle" Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Audio_DynamicRange}" HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="{x:Bind Audio_DynamicRange, Mode=TwoWay}"/> - </StackPanel> - <StackPanel Grid.Column="1"> - <CheckBox x:Name="AudioSurroundToggle" Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Audio_Output_Surround}" HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="{x:Bind Audio_Surround, Mode=TwoWay}"/> - </StackPanel> - <StackPanel Grid.Column="2"> - <CheckBox x:Name="AudioMuteOnMinimizeToggle" Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Audio_MuteOnMinimize}" HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="{x:Bind Audio_MuteOnMinimized, Mode=TwoWay}"/> - </StackPanel> - </controls:UniformGrid> - </StackPanel> - <MenuFlyoutSeparator Margin="0,4,0,8"/> - <StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Language}" Style="{ThemeResource TitleLargeTextBlockStyle}" Margin="0,0,0,16"/> - <Grid> - <Grid.RowDefinitions> - <RowDefinition Height="Auto"/> - <RowDefinition Height="*"/> - </Grid.RowDefinitions> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <TextBlock Grid.Row="0" TextWrapping="Wrap" Margin="0,0,0,16"> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Language_Help1}"/> - <LineBreak/> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.Language_Help2}"/> - </TextBlock> - <Grid Grid.Row="1"> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="200"/> - <ColumnDefinition Width="200"/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0" x:Name="LangSettingLeft" Margin="0,0,24,0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.LanguageAudio}" FontSize="16" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="AudioLangSelector" Margin="-4,0,0,16" CornerRadius="14" HorizontalAlignment="Stretch" SelectedIndex="{x:Bind AudioLang, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.VO_cn}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.VO_en}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.VO_jp}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.VO_kr}"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="1" x:Name="LangSettingRight" Margin="0,0,24,0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.LanguageText}" FontSize="16" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="TextLangSelector" Margin="-4,0,0,16" CornerRadius="14" HorizontalAlignment="Stretch" SelectedIndex="{x:Bind TextLang, Mode=TwoWay}" MaxDropDownHeight="200"> - <ComboBoxItem Content="English"/> - <ComboBoxItem Content="简体中文"/> - <ComboBoxItem Content="繁體中文"/> - <ComboBoxItem Content="Français"/> - <ComboBoxItem Content="Deutsch"/> - <ComboBoxItem Content="Español"/> - <ComboBoxItem Content="Português"/> - <ComboBoxItem Content="Русский"/> - <ComboBoxItem Content="日本語"/> - <ComboBoxItem Content="한국어"/> - <ComboBoxItem Content="ภาษาไทย"/> - <ComboBoxItem Content="Tiếng Việt"/> - <ComboBoxItem Content="Bahasa Indonesia"/> - <ComboBoxItem Content="Türkçe"/> - <ComboBoxItem Content="Italiano"/> - </ComboBox> - </StackPanel> - </Grid> - </Grid> - </StackPanel> - <MenuFlyoutSeparator Margin="0,4,0,8"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.CustomArgs_Title}" Style="{ThemeResource TitleLargeTextBlockStyle}" Margin="0,0,0,16"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.CustomArgs_Subtitle}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,0,0,0"/> - <ToggleSwitch OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" Margin="0,0,0,16" IsOn="{x:Bind IsUseCustomArgs, Mode=TwoWay}"/> - <TextBox x:Name="CustomArgsTextBox" Text="{x:Bind CustomArgsValue, Mode=TwoWay}" CornerRadius="8,8,0,0" - HorizontalAlignment="Stretch" Margin="0,0,0,16"/> - <TextBlock> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.CustomArgs_Footer1}"/> - <Hyperlink NavigateUri="https://docs.unity3d.com/Manual/PlayerCommandLineArguments.html" UnderlineStyle="None"><Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.CustomArgs_Footer2}" FontWeight="Bold"/></Hyperlink> - <Run Text="{x:Bind helper:Locale.Lang._GenshinGameSettingsPage.CustomArgs_Footer3}"/> - </TextBlock> - </StackPanel> - </ScrollViewer> - <Grid x:Name="GameSettingsApplyGrid" VerticalAlignment="Bottom" Background="{ThemeResource GameSettingsApplyGridBrush}" - HorizontalAlignment="Stretch" CornerRadius="8" Margin="16" Padding="16,16" - Shadow="{ThemeResource SharedShadow}"> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="Auto"/> - <ColumnDefinition/> - <ColumnDefinition Width="Auto"/> - </Grid.ColumnDefinitions> - <Button x:Name="ApplyButton" HorizontalAlignment="Left" Style="{ThemeResource AccentButtonStyle}" CornerRadius="16" - VerticalAlignment="Center" IsEnabled="True" Click="ApplyButton_Click" Shadow="{ThemeResource SharedShadow}"> - <StackPanel Orientation="Horizontal" Margin="8,0"> - <FontIcon FontFamily="{ThemeResource FontAwesomeSolid}" Glyph="" FontSize="14"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.ApplyBtn}" Margin="8,0,0,0" FontWeight="Medium"/> - </StackPanel> - </Button> - <TextBlock Grid.Column="1" x:Name="ApplyText" Text="{x:Bind helper:Locale.Lang._GameSettingsPage.SettingsApplied}" Style="{ThemeResource BodyStrongTextBlockStyle}" VerticalAlignment="Center" Margin="16,-4,0,0" HorizontalAlignment="Stretch" TextWrapping="Wrap" Visibility="Collapsed"/> - <StackPanel Grid.Column="2" HorizontalAlignment="Right" Orientation="Horizontal"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportExport}" Margin="16,-4,16,0" VerticalAlignment="Center" FontWeight="Medium"/> - <Button x:Name="RegistryExport" CornerRadius="16,0,0,16" Height="32" - Shadow="{ThemeResource SharedShadow}" - Style="{ThemeResource AccentButtonStyle}" - Click="RegistryExportClick" - ToolTipService.ToolTip="{x:Bind helper:Locale.Lang._GameSettingsPage.RegExportTooltip}"> - <StackPanel Orientation="Horizontal" Margin="8,0"> - <FontIcon FontFamily="{ThemeResource FontAwesomeSolid}" Glyph="" FontSize="14"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegExportTitle}" Margin="8,0,0,0" FontWeight="Medium"/> - </StackPanel> - </Button> - <Button x:Name="RegistryImport" CornerRadius="0,16,16,0" Height="32" - Shadow="{ThemeResource SharedShadow}" - Style="{ThemeResource AccentButtonStyle}" - Click="RegistryImportClick" - ToolTipService.ToolTip="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportTooltip}"> - <StackPanel Orientation="Horizontal" Margin="8,0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportTitle}" Margin="0,0,8,0" FontWeight="Medium"/> - <FontIcon FontFamily="{ThemeResource FontAwesomeSolid}" Glyph="" FontSize="14"/> - </StackPanel> - </Button> - </StackPanel> - </Grid> - </Grid> - <Grid x:Name="Overlay" Visibility="Collapsed"> - <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Vertical" Margin="0,176,0,0"> - <ProgressRing x:Name="Ring" IsActive="True" IsIndeterminate="false" Width="48" Height="48" Margin="32" Value="100" Maximum="100"/> - <TextBlock x:Name="OverlayTitle" Text="Title" Style="{ThemeResource SubtitleTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/> - <TextBlock x:Name="OverlaySubtitle" Text="Subtitle" Style="{ThemeResource BodyStrongTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,8,0,192"/> - </StackPanel> - </Grid> - </Grid> -</Page> diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml.cs b/CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml.cs index c487a5bea..41a2aac8d 100644 --- a/CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml.cs +++ b/CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml.cs @@ -55,6 +55,9 @@ public sealed partial class HomePage : Page private CancellationTokenSource PageToken { get; set; } private CancellationTokenSource CarouselToken { get; set; } private CancellationTokenSource PlaytimeToken { get; set; } + + private int barwidth; + private int consoleWidth; public static int RefreshRateDefault { get; } = 200; public static int RefreshRateSlow { get; } = 1000; @@ -88,6 +91,8 @@ public HomePage() RefreshRate = RefreshRateDefault; this.Loaded += StartLoadedRoutine; m_homePage = this; + + InitializeConsoleValues(); } ~HomePage() @@ -96,6 +101,13 @@ public HomePage() this.Loaded -= StartLoadedRoutine; } + private void InitializeConsoleValues() + { + consoleWidth = 24; + try { consoleWidth = Console.BufferWidth; } catch { } + barwidth = ((consoleWidth - 22) / 2) - 1; + } + private bool IsPageUnload { get; set; } private bool NeedShowEventIcon = true; @@ -1230,6 +1242,8 @@ private async void StartGame(object sender, RoutedEventArgs e) if (CurrentGameProperty._GameVersion.GameType == GameType.Genshin && GetAppConfigValue("ForceGIHDREnable").ToBool()) GenshinHDREnforcer(); + if (_Settings.SettingsCollapseMisc.UseAdvancedGameSettings && _Settings.SettingsCollapseMisc.UseGamePreLaunchCommand) PreLaunchCommand(_Settings); + Process proc = new Process(); proc.StartInfo.FileName = Path.Combine(NormalizePath(GameDirPath), CurrentGameProperty._GameVersion.GamePreset.GameExecutableName); proc.StartInfo.UseShellExecute = true; @@ -1250,7 +1264,7 @@ private async void StartGame(object sender, RoutedEventArgs e) CurrentGameProperty._GameVersion.GamePreset.GameExecutableName, _Settings, CurrentGameProperty._GameVersion.GamePreset.GameType); - GameRunningWatcher(); + GameRunningWatcher(_Settings); if (GetAppConfigValue("EnableConsole").ToBool()) { @@ -1303,11 +1317,12 @@ private async void StartGame(object sender, RoutedEventArgs e) catch (System.ComponentModel.Win32Exception ex) { LogWriteLine($"There is a problem while trying to launch Game with Region: {CurrentGameProperty._GameVersion.GamePreset.ZoneName}\r\nTraceback: {ex}", LogType.Error, true); + ErrorSender.SendException(new System.ComponentModel.Win32Exception($"There was an error while trying to launch the game!\r\tThrow: {ex}", ex)); } } // Use this method to do something when game is closed - private async void GameRunningWatcher() + private async void GameRunningWatcher(IGameSettingsUniversal _settings) { await Task.Delay(5000); while (_cachedIsGameRunning) @@ -1315,6 +1330,8 @@ private async void GameRunningWatcher() await Task.Delay(3000); } + LogWriteLine($"{new string('=', barwidth)} GAME STOPPED {new string('=', barwidth)}", LogType.Warning, true); + if (ResizableWindowHookToken != null) { ResizableWindowHookToken.Cancel(); @@ -1325,6 +1342,9 @@ private async void GameRunningWatcher() if (GetAppConfigValue("EnableConsole").ToBool()) WatchOutputLog.Cancel(); + // Stop PreLaunchCommand process + if (_settings.SettingsCollapseMisc.GamePreLaunchExitOnGameStop) PreLaunchCommand_ForceClose(); + // Window manager on game closed switch (GetAppConfigValue("GameLaunchedBehavior").ToString()) { @@ -1341,6 +1361,9 @@ private async void GameRunningWatcher() (m_window as MainWindow).Restore(); break; } + + // Run Post Launch Command + if (_settings.SettingsCollapseMisc.UseAdvancedGameSettings && _settings.SettingsCollapseMisc.UseGamePostExitCommand) PostExitCommand(_settings); } private void StopGame(PresetConfigV2 gamePreset) @@ -1582,11 +1605,8 @@ public async void StartExclusiveWindowPayload() #region Game Log Method public async void ReadOutputLog() { - int consoleWidth = 24; - try { consoleWidth = Console.BufferWidth; } catch { } + InitializeConsoleValues(); - string line; - int barwidth = ((consoleWidth - 22) / 2) - 1; LogWriteLine($"Are Game logs getting saved to Collapse logs: {GetAppConfigValue("IncludeGameLogs").ToBool()}", LogType.Scheme, true); LogWriteLine($"{new string('=', barwidth)} GAME STARTED {new string('=', barwidth)}", LogType.Warning, true); try @@ -1603,6 +1623,7 @@ public async void ReadOutputLog() { while (!reader.EndOfStream) { + string line; line = await reader.ReadLineAsync(WatchOutputLog.Token); if (RequireWindowExclusivePayload && line == "MoleMole.MonoGameEntry:Awake()") { @@ -1615,14 +1636,10 @@ public async void ReadOutputLog() } } } - catch (OperationCanceledException) - { - LogWriteLine($"{new string('=', barwidth)} GAME STOPPED {new string('=', barwidth)}", LogType.Warning, true); - (m_window as MainWindow).Restore(); - } + catch (OperationCanceledException) { } catch (Exception ex) { - LogWriteLine($"{ex}", LogType.Error); + LogWriteLine($"There were a problem in Game Log Reader\r\n{ex}", LogType.Error); } } #endregion @@ -2068,6 +2085,122 @@ private void GenshinHDREnforcer() } #endregion + #region Pre/Post Game Launch Command + private Process _procPreGLC; + + private async void PreLaunchCommand(IGameSettingsUniversal _settings) + { + try + { + string preGameLaunchCommand = _settings?.SettingsCollapseMisc?.GamePreLaunchCommand; + if (string.IsNullOrEmpty(preGameLaunchCommand)) return; + + LogWriteLine($"Using Pre-launch command : {preGameLaunchCommand}\r\n\t" + + $"BY USING THIS, NO SUPPORT IS PROVIDED IF SOMETHING HAPPENED TO YOUR ACCOUNT, GAME, OR SYSTEM!", + LogType.Warning, true); + + _procPreGLC = new Process(); + + _procPreGLC.StartInfo.FileName = "cmd.exe"; + _procPreGLC.StartInfo.Arguments = "/S /C " + "\"" + preGameLaunchCommand + "\""; + _procPreGLC.StartInfo.CreateNoWindow = true; + _procPreGLC.StartInfo.UseShellExecute = false; + _procPreGLC.StartInfo.RedirectStandardOutput = true; + _procPreGLC.StartInfo.RedirectStandardError = true; + + _procPreGLC.OutputDataReceived += (sender, e) => + { + if (!string.IsNullOrEmpty(e.Data)) LogWriteLine(e.Data, LogType.GLC, true); + }; + + _procPreGLC.ErrorDataReceived += (sender, e) => + { + if (!string.IsNullOrEmpty(e.Data)) LogWriteLine($"ERROR RECEIVED!\r\n\t{e.Data}", LogType.GLC, true); + }; + + _procPreGLC.Start(); + + _procPreGLC.BeginOutputReadLine(); + _procPreGLC.BeginErrorReadLine(); + + await _procPreGLC.WaitForExitAsync(); + } + catch ( System.ComponentModel.Win32Exception ex ) + { + LogWriteLine($"There is a problem while trying to launch Pre-Game Command with Region: {CurrentGameProperty._GameVersion.GamePreset.ZoneName}\r\nTraceback: {ex}", LogType.Error, true); + ErrorSender.SendException(new System.ComponentModel.Win32Exception($"There was an error while trying to launch Pre-Launch command!\r\tThrow: {ex}", ex)); + } + finally + { + if (_procPreGLC != null) _procPreGLC.Dispose(); + } + } + + private void PreLaunchCommand_ForceClose() + { + try + { + if (_procPreGLC != null && !_procPreGLC.HasExited) + { + // Kill main and child processes + Process taskKill = new Process(); + taskKill.StartInfo.FileName = "taskkill"; + taskKill.StartInfo.Arguments = $"/F /T /PID {_procPreGLC.Id}"; + taskKill.Start(); + taskKill.WaitForExit(); + + LogWriteLine("Pre-launch command has been forced to close!", LogType.Warning, true); + } + } + // Ignore external errors + catch ( InvalidOperationException ) {} + catch (System.ComponentModel.Win32Exception) {} + } + + private async void PostExitCommand(IGameSettingsUniversal _settings) + { + try + { + string postGameExitCommand = _settings?.SettingsCollapseMisc?.GamePostExitCommand ?? null; + if (string.IsNullOrEmpty(postGameExitCommand)) return; + + LogWriteLine($"Using Post-launch command : {postGameExitCommand}\r\n\t" + + $"BY USING THIS, NO SUPPORT IS PROVIDED IF SOMETHING HAPPENED TO YOUR ACCOUNT, GAME, OR SYSTEM!", + LogType.Warning, true); + + Process procPostGLC = new Process(); + + procPostGLC.StartInfo.FileName = "cmd.exe"; + procPostGLC.StartInfo.Arguments = "/S /C " + "\"" + postGameExitCommand + "\""; + procPostGLC.StartInfo.CreateNoWindow = true; + procPostGLC.StartInfo.UseShellExecute = false; + procPostGLC.StartInfo.RedirectStandardOutput = true; + procPostGLC.StartInfo.RedirectStandardError = true; + + procPostGLC.OutputDataReceived += (sender, e) => + { + if (!string.IsNullOrEmpty(e.Data)) LogWriteLine(e.Data, LogType.GLC, true); + }; + + procPostGLC.ErrorDataReceived += (sender, e) => + { + if (!string.IsNullOrEmpty(e.Data)) LogWriteLine($"ERROR RECEIVED!\r\n\t{e.Data}", LogType.GLC, true); + }; + + procPostGLC.Start(); + procPostGLC.BeginOutputReadLine(); + procPostGLC.BeginErrorReadLine(); + + await procPostGLC.WaitForExitAsync(); + } + catch ( System.ComponentModel.Win32Exception ex ) + { + LogWriteLine($"There is a problem while trying to launch Post-Game Command with Region: {CurrentGameProperty._GameVersion.GamePreset.ZoneName}\r\nTraceback: {ex}", LogType.Error, true); + ErrorSender.SendException(new System.ComponentModel.Win32Exception($"There was an error while trying to launch Post-Exit command\r\tThrow: {ex}", ex)); + } + } + #endregion + #region Shortcut Creation private async void AddToSteamButton_Click(object sender, RoutedEventArgs e) { diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/StarRailGameSettingsPage.xaml b/CollapseLauncher/XAMLs/MainApp/Pages/StarRailGameSettingsPage.xaml deleted file mode 100644 index ceef3fec4..000000000 --- a/CollapseLauncher/XAMLs/MainApp/Pages/StarRailGameSettingsPage.xaml +++ /dev/null @@ -1,448 +0,0 @@ -<Page - x:Class="CollapseLauncher.Pages.StarRailGameSettingsPage" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:CollapseLauncher" - xmlns:helper="using:Hi3Helper" - xmlns:conv="using:CollapseLauncher.Pages" - xmlns:settype="using:CollapseLauncher.GameSettings" - xmlns:static="using:CollapseLauncher.GameSettings.StarRail" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - mc:Ignorable="d" - Loaded="InitializeSettings" Unloaded="OnUnload"> - <Page.Resources> - <ThemeShadow x:Name="SharedShadow"/> - <conv:InverseBooleanConverter x:Key="BooleanInverse"/> - </Page.Resources> - <Grid> - <Grid x:Name="PageContent"> - <ScrollViewer VerticalScrollBarVisibility="Auto"> - <StackPanel Margin="32,40,32,32" Padding="0,0,0,74"> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_Title}" Style="{ThemeResource TitleLargeTextBlockStyle}" Margin="0,0,0,16"/> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0" Margin="0,0,32,0"> - <StackPanel x:Name="GameResolutionPanel" Margin="0,16"> - <StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ResolutionPanel}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,0,0,16"/> - <StackPanel x:Name="GameResolutionWindow" Orientation="Vertical" Margin="0,0,0,8"> - <CheckBox x:Name="VSyncToggle" Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_VSync}" HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="{x:Bind EnableVSync, Mode=TwoWay}"/> - <CheckBox x:Name="GameResolutionFullscreen" Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_Fullscreen}" - HorizontalAlignment="Left" VerticalAlignment="Center" - IsChecked="{x:Bind IsFullscreenEnabled, Mode=TwoWay}"/> - <CheckBox x:Name="GameResolutionBorderless" Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_Borderless}" - HorizontalAlignment="Left" VerticalAlignment="Center" - IsChecked="{x:Bind IsBorderlessEnabled, Mode=TwoWay}"/> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="Auto"/> - <ColumnDefinition Width="Auto"/> - </Grid.ColumnDefinitions> - <CheckBox x:Name="GameWindowResizable" Content="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResizableWindow}" - HorizontalAlignment="Left" VerticalAlignment="Center" - IsEnabled="{x:Bind IsCanResizableWindow, Mode=OneWay}" - IsChecked="{x:Bind IsResizableWindow, Mode=TwoWay}"/> - <Button Grid.Column="1" Margin="8,-4,0,0" Style="{ThemeResource ButtonRevealStyle}"> - <Button.Content> - <FontIcon - FontFamily="{ThemeResource FontAwesome}" - FontSize="12" - Glyph="?" /> - </Button.Content> - <Button.Flyout> - <Flyout AllowFocusOnInteraction="True"> - <TextBlock - Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Graphics_ResizableWindowTooltip}" - MaxWidth="360" - TextWrapping="Wrap" - TextAlignment="Center" - FontWeight="SemiBold"/> - </Flyout> - </Button.Flyout> - </Button> - </Grid> - <!-- - Exclusive Fullscreen option is disabled in Honkai:Star Rail due to it being ignored by the game - Delete `Visibility="Collapsed"' to revert this change - --> - <CheckBox x:Name="GameResolutionFullscreenExclusive" Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ExclusiveFullscreen}" - HorizontalAlignment="Left" VerticalAlignment="Center" - IsEnabled="{x:Bind IsCanExclusiveFullscreen, Mode=OneWay}" Visibility="Collapsed" - IsChecked="{x:Bind IsExclusiveFullscreenEnabled, Mode=TwoWay}"/> - </StackPanel> - <StackPanel Orientation="Horizontal" Margin="0,0,0,16"> - <ComboBox CornerRadius="14" x:Name="GameResolutionSelector" - PlaceholderText="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ResSelectPlaceholder}" Width="128" - IsEnabled="{x:Bind IsCustomResolutionEnabled, Mode=OneWay, Converter={StaticResource BooleanInverse}}" - SelectedItem="{x:Bind ResolutionSelected, Mode=TwoWay}"/> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="Auto"/> - <ColumnDefinition Width="Auto"/> - </Grid.ColumnDefinitions> - <CheckBox x:Name="GameCustomResolutionCheckbox" Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ResCustom}" - VerticalAlignment="Center" Margin="16,0,0,0" - IsEnabled="{x:Bind IsCanCustomResolution, Mode=OneWay}" - IsChecked="{x:Bind IsCustomResolutionEnabled, Mode=TwoWay}"/> - <Button Grid.Column="1" Margin="8,-4,0,0" Style="{ThemeResource ButtonRevealStyle}"> - <Button.Content> - <FontIcon - FontFamily="{ThemeResource FontAwesome}" - FontSize="12" - Glyph="?" /> - </Button.Content> - <Button.Flyout> - <Flyout AllowFocusOnInteraction="True"> - <TextBlock - Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ResCustomTooltip}" - MaxWidth="360" - TextWrapping="Wrap" - TextAlignment="Center" - FontWeight="SemiBold"/> - </Flyout> - </Button.Flyout> - </Button> - </Grid> - </StackPanel> - </StackPanel> - <StackPanel x:Name="GameCustomResolutionPanel" Orientation="Horizontal"> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ResCustomW}" VerticalAlignment="Center" Margin="0,0,8,0"/> - <NumberBox CornerRadius="8,8,0,0" x:Name="GameCustomResolutionWidth" Value="{x:Bind ResolutionW, Mode=TwoWay}" - IsEnabled="{x:Bind IsCanResolutionWH, Mode=OneWay}" - HorizontalAlignment="Left" Width="100"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ResCustomH}" VerticalAlignment="Center" Margin="16,0,8,0"/> - <NumberBox CornerRadius="8,8,0,0" x:Name="GameCustomResolutionHeight" Value="{x:Bind ResolutionH, Mode=TwoWay}" - IsEnabled="{x:Bind IsCanResolutionWH, Mode=OneWay}" - HorizontalAlignment="Left" Width="100"/> - </StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_FPS}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,16,8,0"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_FPS_Help}" Style="{ThemeResource CaptionTextBlockStyle}" Margin="0,4,0,0"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_FPS_Help2}" Style="{ThemeResource CaptionTextBlockStyle}" Margin="0,4,0,8"/> - <ComboBox x:Name="FPSSelector" SelectedIndex="{x:Bind FPS, Mode=TwoWay}" ItemsSource="{x:Bind static:Model.FPSIndex}" Margin="0,8,0,0" Width="128" CornerRadius="14"/> - </StackPanel> - <StackPanel x:Name="GameBoostPanel" Orientation="Horizontal"> - <ToggleSwitch Header="{x:Bind helper:Locale.Lang._GameSettingsPage.GameBoost}" OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" IsOn="{x:Bind IsGameBoost, Mode=TwoWay}" Margin="4,0,0,8"/> - </StackPanel> - </StackPanel> - <StackPanel x:Name="StarRailGameGraphicsPanel" Margin="0,16" Grid.Column="1"> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_SpecPanel}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,0,0,16"/> - <StackPanel> - <StackPanel Grid.Column="0" Margin="0,0,56,8"> - <Grid x:Name="RenderScaleGrid"> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_RenderScale}" Style="{ThemeResource BodyStrongTextBlockStyle}"/> - <TextBlock Text="{Binding Value, ElementName=RenderScaleSlider}" HorizontalAlignment="Right" Style="{ThemeResource BodyStrongTextBlockStyle}"/> - </Grid> - <Slider x:Name="RenderScaleSlider" Minimum="0.6" Value="{x:Bind RenderScale, Mode=TwoWay}" Maximum="2.0" StepFrequency="0.2" TickFrequency="0.2" TickPlacement="Outside"/> - </StackPanel> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ShadowQuality}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="ShadowQualitySelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind ShadowQuality, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryLow}" Visibility="Collapsed" IsEnabled="False"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecHigh}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryHigh}" Visibility="Collapsed" IsEnabled="False"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="1"> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_LightQuality}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="LightQualitySelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind LightQuality, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}" Visibility="Collapsed" IsEnabled="False"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecHigh}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryHigh}"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="2"> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_CharacterQuality}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="CharacterQualitySelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind CharacterQuality, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}" Visibility="Collapsed" IsEnabled="False"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryLow}" Visibility="Collapsed" IsEnabled="False"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecHigh}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryHigh}" Visibility="Collapsed" IsEnabled="False"/> - </ComboBox> - </StackPanel> - </Grid> - </StackPanel> - <StackPanel> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_EnvDetailQuality}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,8,0,8"/> - <ComboBox x:Name="EnvDetailQualitySelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind EnvDetailQuality, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}" Visibility="Collapsed" IsEnabled="False"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecHigh}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryHigh}"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="1"> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ReflectionQuality}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,8,0,8"/> - <ComboBox x:Name="ReflectionQualitySelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind ReflectionQuality, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}" Visibility="Collapsed" IsEnabled="False"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecHigh}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryHigh}"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="2"> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_BloomQuality}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,8,0,8"/> - <ComboBox x:Name="BloomQualitySelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind BloomQuality, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecHigh}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryHigh}"/> - </ComboBox> - </StackPanel> - </Grid> - </StackPanel> - <StackPanel> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_AAMode}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,8,0,8"/> - <ComboBox x:Name="AAModeSelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind AAMode, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}"/> - <ComboBoxItem Content="TAA"/> - <ComboBoxItem Content="FXAA"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="1"> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_ResolutionQuality}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,8,0,8"/> - <ComboBox x:Name="ResolutionQualitySelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind ResolutionQuality, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecHigh}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryHigh}"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="2"> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Graphics_SFXQuality}" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,8,0,8"/> - <ComboBox x:Name="SFXQualitySelector" Margin="0,0,0,8" Width="128" CornerRadius="14" SelectedIndex="{x:Bind SFXQuality, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecDisabled}" Visibility="Collapsed" IsEnabled="False"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecLow}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecMedium}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecHigh}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.SpecVeryHigh}" Visibility="Collapsed" IsEnabled="False"/> - </ComboBox> - </StackPanel> - </Grid> - </StackPanel> - </StackPanel> - </Grid> - <MenuFlyoutSeparator Margin="0,4,0,8"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Audio_Title}" Style="{ThemeResource TitleLargeTextBlockStyle}" Margin="0,0,0,16"/> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0"> - <StackPanel x:Name="AudioSettingsPanelLeft" Margin="0,16,64,16"> - <StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Audio_Master}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,0,0,16"/> - <StackPanel Orientation="Vertical" Margin="0,0,32,8"> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="40px"/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" VerticalAlignment="Center" Text="{Binding Value, ElementName=AudioMasterVolumeSlider}"/> - <Slider x:Name="AudioMasterVolumeSlider" Grid.Column="1" TickFrequency="1" Maximum="10" TickPlacement="Outside" - Value="{x:Bind AudioMasterVolume, Mode=TwoWay}"/> - </Grid> - </StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Audio_SFX}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,16,0,16"/> - <StackPanel Orientation="Vertical" Margin="0,0,32,8"> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="40px"/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" VerticalAlignment="Center" Text="{Binding Value, ElementName=AudioSFXVolumeSlider}"/> - <Slider x:Name="AudioSFXVolumeSlider" Grid.Column="1" TickFrequency="1" Maximum="10" TickPlacement="Outside" - Value="{x:Bind AudioSFXVolume, Mode=TwoWay}"/> - </Grid> - </StackPanel> - </StackPanel> - </StackPanel> - </StackPanel> - <StackPanel Grid.Column="1"> - <StackPanel x:Name="AudioSettingsPanelRight" Margin="0,16,64,16"> - <StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Audio_BGM}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,0,0,16"/> - <StackPanel Orientation="Vertical" Margin="0,0,32,8"> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="40px"/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" VerticalAlignment="Center" Text="{Binding Value, ElementName=AudioBGMVolumeSlider}"/> - <Slider x:Name="AudioBGMVolumeSlider" Grid.Column="1" TickFrequency="1" Maximum="10" TickPlacement="Outside" - Value="{x:Bind AudioBGMVolume, Mode=TwoWay}"/> - </Grid> - </StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Audio_VO}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,16,0,16"/> - <StackPanel Orientation="Vertical" Margin="0,0,32,8"> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="40px"/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" VerticalAlignment="Center" Text="{Binding Value, ElementName=AudioVOVolumeSlider}"/> - <Slider x:Name="AudioVOVolumeSlider" Grid.Column="1" TickFrequency="1" Maximum="10" TickPlacement="Outside" - Value="{x:Bind AudioVOVolume, Mode=TwoWay}"/> - </Grid> - </StackPanel> - </StackPanel> - </StackPanel> - </StackPanel> - </Grid> - <MenuFlyoutSeparator Margin="0,4,0,8"/> - - <StackPanel> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Language}" Style="{ThemeResource TitleLargeTextBlockStyle}" Margin="0,0,0,16"/> - <Grid> - <Grid.RowDefinitions> - <RowDefinition Height="Auto"/> - <RowDefinition Height="*"/> - </Grid.RowDefinitions> - <Grid.ColumnDefinitions> - <ColumnDefinition/> - <ColumnDefinition/> - </Grid.ColumnDefinitions> - <TextBlock Grid.Row="0" TextWrapping="Wrap" Margin="0,0,0,16"> - <Run Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Language_Help1}"/> - <LineBreak/> - <Run Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.Language_Help2}"/> - </TextBlock> - <Grid Grid.Row="1"> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="200"/> - <ColumnDefinition Width="200"/> - </Grid.ColumnDefinitions> - <StackPanel Grid.Column="0" x:Name="LangSettingLeft" Margin="0,0,24,0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.LanguageAudio}" FontSize="16" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="AudioLangSelector" Margin="-4,0,0,16" CornerRadius="14" HorizontalAlignment="Stretch" SelectedIndex="{x:Bind AudioLang, Mode=TwoWay}"> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.VO_en}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.VO_jp}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.VO_cn}"/> - <ComboBoxItem Content="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.VO_kr}"/> - </ComboBox> - </StackPanel> - <StackPanel Grid.Column="1" x:Name="LangSettingRight" Margin="0,0,24,0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.LanguageText}" FontSize="16" Style="{ThemeResource BodyStrongTextBlockStyle}" Margin="0,0,0,8"/> - <ComboBox x:Name="TextLangSelector" Margin="-4,0,0,16" CornerRadius="14" HorizontalAlignment="Stretch" SelectedIndex="{x:Bind TextLang, Mode=TwoWay}" MaxDropDownHeight="200"> - <ComboBoxItem Content="English"/> - <ComboBoxItem Content="日本語"/> - <ComboBoxItem Content="简体中文"/> - <ComboBoxItem Content="繁體中文"/> - <ComboBoxItem Content="한국어"/> - <ComboBoxItem Content="Español"/> - <ComboBoxItem Content="Русский"/> - <ComboBoxItem Content="ภาษาไทย"/> - <ComboBoxItem Content="Tiếng Việt"/> - <ComboBoxItem Content="Bahasa Indonesia"/> - <ComboBoxItem Content="Français"/> - <ComboBoxItem Content="Deutsch"/> - <ComboBoxItem Content="Português"/> - </ComboBox> - </StackPanel> - </Grid> - </Grid> - </StackPanel> - <MenuFlyoutSeparator Margin="0,4,0,8"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.CustomArgs_Title}" Style="{ThemeResource TitleLargeTextBlockStyle}" Margin="0,0,0,16"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.CustomArgs_Subtitle}" Style="{ThemeResource SubtitleTextBlockStyle}" Margin="0,0,0,0"/> - <ToggleSwitch OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}" Margin="0,0,0,16" IsOn="{x:Bind IsUseCustomArgs, Mode=TwoWay}"/> - <TextBox x:Name="CustomArgsTextBox" Text="{x:Bind CustomArgsValue, Mode=TwoWay}" CornerRadius="8,8,0,0" - HorizontalAlignment="Stretch" Margin="0,0,0,16"/> - <TextBlock> - <Run Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.CustomArgs_Footer1}"/> - <Hyperlink NavigateUri="https://docs.unity3d.com/Manual/PlayerCommandLineArguments.html" UnderlineStyle="None"><Run Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.CustomArgs_Footer2}" FontWeight="Bold"/></Hyperlink> - <Run Text="{x:Bind helper:Locale.Lang._StarRailGameSettingsPage.CustomArgs_Footer3}"/> - </TextBlock> - </StackPanel> - </ScrollViewer> - <Grid x:Name="GameSettingsApplyGrid" VerticalAlignment="Bottom" Background="{ThemeResource GameSettingsApplyGridBrush}" - HorizontalAlignment="Stretch" CornerRadius="8" Margin="16" Padding="16,16" - Shadow="{ThemeResource SharedShadow}"> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="Auto"/> - <ColumnDefinition/> - <ColumnDefinition Width="Auto"/> - </Grid.ColumnDefinitions> - <Button x:Name="ApplyButton" HorizontalAlignment="Left" Style="{ThemeResource AccentButtonStyle}" CornerRadius="16" - VerticalAlignment="Center" IsEnabled="True" Click="ApplyButton_Click" Shadow="{ThemeResource SharedShadow}"> - <StackPanel Orientation="Horizontal" Margin="8,0"> - <FontIcon FontFamily="{ThemeResource FontAwesomeSolid}" Glyph="" FontSize="14"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.ApplyBtn}" Margin="8,0,0,0" FontWeight="Medium"/> - </StackPanel> - </Button> - <TextBlock Grid.Column="1" x:Name="ApplyText" Text="{x:Bind helper:Locale.Lang._GameSettingsPage.SettingsApplied}" Style="{ThemeResource BodyStrongTextBlockStyle}" VerticalAlignment="Center" Margin="16,-4,0,0" HorizontalAlignment="Stretch" TextWrapping="Wrap" Visibility="Collapsed"/> - <StackPanel Grid.Column="2" HorizontalAlignment="Right" Orientation="Horizontal"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportExport}" Margin="16,-4,16,0" VerticalAlignment="Center" FontWeight="Medium"/> - <Button x:Name="RegistryExport" CornerRadius="16,0,0,16" Height="32" - Shadow="{ThemeResource SharedShadow}" - Style="{ThemeResource AccentButtonStyle}" - Click="RegistryExportClick" - ToolTipService.ToolTip="{x:Bind helper:Locale.Lang._GameSettingsPage.RegExportTooltip}"> - <StackPanel Orientation="Horizontal" Margin="8,0"> - <FontIcon FontFamily="{ThemeResource FontAwesomeSolid}" Glyph="" FontSize="14"/> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegExportTitle}" Margin="8,0,0,0" FontWeight="Medium"/> - </StackPanel> - </Button> - <Button x:Name="RegistryImport" CornerRadius="0,16,16,0" Height="32" - Shadow="{ThemeResource SharedShadow}" - Style="{ThemeResource AccentButtonStyle}" - Click="RegistryImportClick" - ToolTipService.ToolTip="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportTooltip}"> - <StackPanel Orientation="Horizontal" Margin="8,0"> - <TextBlock Text="{x:Bind helper:Locale.Lang._GameSettingsPage.RegImportTitle}" Margin="0,0,8,0" FontWeight="Medium"/> - <FontIcon FontFamily="{ThemeResource FontAwesomeSolid}" Glyph="" FontSize="14"/> - </StackPanel> - </Button> - </StackPanel> - </Grid> - </Grid> - <Grid x:Name="Overlay" Visibility="Collapsed"> - <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Vertical" Margin="0,176,0,0"> - <ProgressRing x:Name="Ring" IsActive="True" IsIndeterminate="false" Width="48" Height="48" Margin="32" Value="100" Maximum="100"/> - <TextBlock x:Name="OverlayTitle" Text="Title" Style="{ThemeResource SubtitleTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/> - <TextBlock x:Name="OverlaySubtitle" Text="Subtitle" Style="{ThemeResource BodyStrongTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,8,0,192"/> - </StackPanel> - </Grid> - </Grid> -</Page> \ No newline at end of file diff --git a/Hi3Helper.Core/Classes/Logger/Enum/LogType.cs b/Hi3Helper.Core/Classes/Logger/Enum/LogType.cs index 8b60e9542..d9062a622 100644 --- a/Hi3Helper.Core/Classes/Logger/Enum/LogType.cs +++ b/Hi3Helper.Core/Classes/Logger/Enum/LogType.cs @@ -8,6 +8,7 @@ public enum LogType Scheme, NoTag, Game, - Debug + Debug, + GLC } } diff --git a/Hi3Helper.Core/Classes/Logger/LoggerBase.cs b/Hi3Helper.Core/Classes/Logger/LoggerBase.cs index e69669203..282241e77 100644 --- a/Hi3Helper.Core/Classes/Logger/LoggerBase.cs +++ b/Hi3Helper.Core/Classes/Logger/LoggerBase.cs @@ -184,6 +184,7 @@ private int GetTotalInstance() LogType.Scheme => "\u001b[34;1m", LogType.Game => "\u001b[35;1m", LogType.Debug => "\u001b[36;1m", + LogType.GLC => "\u001b[91;1m", _ => string.Empty }; @@ -201,6 +202,7 @@ private int GetTotalInstance() LogType.Scheme => "[Schm]", LogType.Game => "[Game]", LogType.Debug => "[DBG]", + LogType.GLC => "[GLC]", LogType.NoTag => " ", _ => throw ThrowInvalidType() }; diff --git a/Hi3Helper.Core/Lang/Locale/LangGameSettingsPage.cs b/Hi3Helper.Core/Lang/Locale/LangGameSettingsPage.cs index b24da6eab..0f8ba0d88 100644 --- a/Hi3Helper.Core/Lang/Locale/LangGameSettingsPage.cs +++ b/Hi3Helper.Core/Lang/Locale/LangGameSettingsPage.cs @@ -8,85 +8,95 @@ public sealed partial class LocalizationParams public LangGameSettingsPage _GameSettingsPage { get; set; } = LangFallback?._GameSettingsPage; public sealed class LangGameSettingsPage { - public string PageTitle { get; set; } = LangFallback?._GameSettingsPage.PageTitle; - public string Graphics_Title { get; set; } = LangFallback?._GameSettingsPage.Graphics_Title; - public string Graphics_ResolutionPanel { get; set; } = LangFallback?._GameSettingsPage.Graphics_ResolutionPanel; - public string Graphics_Fullscreen { get; set; } = LangFallback?._GameSettingsPage.Graphics_Fullscreen; - public string Graphics_Borderless { get; set; } = LangFallback?._GameSettingsPage.Graphics_Borderless; - public string Graphics_ExclusiveFullscreen { get; set; } = LangFallback?._GameSettingsPage.Graphics_ExclusiveFullscreen; - public string Graphics_ResizableWindow { get; set; } = LangFallback?._GameSettingsPage.Graphics_ResizableWindow; + public string PageTitle { get; set; } = LangFallback?._GameSettingsPage.PageTitle; + public string Graphics_Title { get; set; } = LangFallback?._GameSettingsPage.Graphics_Title; + public string Graphics_ResolutionPanel { get; set; } = LangFallback?._GameSettingsPage.Graphics_ResolutionPanel; + public string Graphics_Fullscreen { get; set; } = LangFallback?._GameSettingsPage.Graphics_Fullscreen; + public string Graphics_Borderless { get; set; } = LangFallback?._GameSettingsPage.Graphics_Borderless; + public string Graphics_ExclusiveFullscreen { get; set; } = LangFallback?._GameSettingsPage.Graphics_ExclusiveFullscreen; + public string Graphics_ResizableWindow { get; set; } = LangFallback?._GameSettingsPage.Graphics_ResizableWindow; public string Graphics_ResizableWindowTooltip { get; set; } = LangFallback?._GameSettingsPage.Graphics_ResizableWindowTooltip; - public string Graphics_ResSelectPlaceholder { get; set; } = LangFallback?._GameSettingsPage.Graphics_ResSelectPlaceholder; - public string Graphics_ResCustom { get; set; } = LangFallback?._GameSettingsPage.Graphics_ResCustom; - public string Graphics_ResCustomW { get; set; } = LangFallback?._GameSettingsPage.Graphics_ResCustomW; - public string Graphics_ResCustomH { get; set; } = LangFallback?._GameSettingsPage.Graphics_ResCustomH; - public string Graphics_FPSPanel { get; set; } = LangFallback?._GameSettingsPage.Graphics_FPSPanel; - public string Graphics_FPSInCombat { get; set; } = LangFallback?._GameSettingsPage.Graphics_FPSInCombat; - public string Graphics_FPSInMenu { get; set; } = LangFallback?._GameSettingsPage.Graphics_FPSInMenu; - public string Graphics_APIPanel { get; set; } = LangFallback?._GameSettingsPage.Graphics_APIPanel; - public string Graphics_APIHelp1 { get; set; } = LangFallback?._GameSettingsPage.Graphics_APIHelp1; - public string Graphics_APIHelp2 { get; set; } = LangFallback?._GameSettingsPage.Graphics_APIHelp2; - public string Graphics_APIHelp3 { get; set; } = LangFallback?._GameSettingsPage.Graphics_APIHelp3; - public string Graphics_SpecPanel { get; set; } = LangFallback?._GameSettingsPage.Graphics_SpecPanel; - public string Graphics_Preset { get; set; } = LangFallback?._GameSettingsPage.Graphics_Preset; - public string Graphics_Render { get; set; } = LangFallback?._GameSettingsPage.Graphics_Render; - public string Graphics_Shadow { get; set; } = LangFallback?._GameSettingsPage.Graphics_Shadow; - public string Graphics_Reflection { get; set; } = LangFallback?._GameSettingsPage.Graphics_Reflection; - public string Graphics_FX { get; set; } = LangFallback?._GameSettingsPage.Graphics_FX; - public string Graphics_FXPost { get; set; } = LangFallback?._GameSettingsPage.Graphics_FXPost; - public string Graphics_FXPhysics { get; set; } = LangFallback?._GameSettingsPage.Graphics_FXPhysics; - public string Graphics_FXHDR { get; set; } = LangFallback?._GameSettingsPage.Graphics_FXHDR; - public string Graphics_FXHQ { get; set; } = LangFallback?._GameSettingsPage.Graphics_FXHQ; - public string Graphics_FXAA { get; set; } = LangFallback?._GameSettingsPage.Graphics_FXAA; - public string Graphics_FXDistort { get; set; } = LangFallback?._GameSettingsPage.Graphics_FXDistort; - public string Graphics_APHO2Panel { get; set; } = LangFallback?._GameSettingsPage.Graphics_APHO2Panel; - public string Graphics_APHO2GI { get; set; } = LangFallback?._GameSettingsPage.Graphics_APHO2GI; - public string Graphics_APHO2VL { get; set; } = LangFallback?._GameSettingsPage.Graphics_APHO2VL; - public string Graphics_APHO2AO { get; set; } = LangFallback?._GameSettingsPage.Graphics_APHO2AO; - public string Graphics_APHO2LOD { get; set; } = LangFallback?._GameSettingsPage.Graphics_APHO2LOD; - public string SpecDisabled { get; set; } = LangFallback?._GameSettingsPage.SpecDisabled; - public string SpecLow { get; set; } = LangFallback?._GameSettingsPage.SpecLow; - public string SpecMedium { get; set; } = LangFallback?._GameSettingsPage.SpecMedium; - public string SpecHigh { get; set; } = LangFallback?._GameSettingsPage.SpecHigh; - public string SpecVeryHigh { get; set; } = LangFallback?._GameSettingsPage.SpecVeryHigh; - public string SpecMaximum { get; set; } = LangFallback?._GameSettingsPage.SpecMaximum; - public string Audio_Title { get; set; } = LangFallback?._GameSettingsPage.Audio_Title; - public string Audio_Mute { get; set; } = LangFallback?._GameSettingsPage.Audio_Mute; - public string Audio_Master { get; set; } = LangFallback?._GameSettingsPage.Audio_Master; - public string Audio_BGM { get; set; } = LangFallback?._GameSettingsPage.Audio_BGM; - public string Audio_SFX { get; set; } = LangFallback?._GameSettingsPage.Audio_SFX; - public string Audio_VOLang { get; set; } = LangFallback?._GameSettingsPage.Audio_VOLang; - public string Audio_VOLang1 { get; set; } = LangFallback?._GameSettingsPage.Audio_VOLang1; - public string Audio_VOLang2 { get; set; } = LangFallback?._GameSettingsPage.Audio_VOLang2; - public string Audio_VODefault { get; set; } = LangFallback?._GameSettingsPage.Audio_VODefault; - public string Audio_VO { get; set; } = LangFallback?._GameSettingsPage.Audio_VO; - public string Audio_Elf { get; set; } = LangFallback?._GameSettingsPage.Audio_Elf; - public string Audio_Cutscenes { get; set; } = LangFallback?._GameSettingsPage.Audio_Cutscenes; - public string ApplyBtn { get; set; } = LangFallback?._GameSettingsPage.ApplyBtn; - public string SettingsApplied { get; set; } = LangFallback?._GameSettingsPage.SettingsApplied; - public string SettingsRegExported { get; set; } = LangFallback?._GameSettingsPage.SettingsRegExported; - public string SettingsRegExportTitle { get; set; } = LangFallback?._GameSettingsPage.SettingsRegExportTitle; - public string SettingsRegImported { get; set; } = LangFallback?._GameSettingsPage.SettingsRegImported; - public string SettingsRegImportTitle { get; set; } = LangFallback?._GameSettingsPage.SettingsRegImportTitle; - public string SettingsRegErr1 { get; set; } = LangFallback?._GameSettingsPage.SettingsRegErr1; - public string SettingsRegErr2 { get; set; } = LangFallback?._GameSettingsPage.SettingsRegErr2; - public string RegImportExport { get; set; } = LangFallback?._GameSettingsPage.RegImportExport; - public string RegExportTitle { get; set; } = LangFallback?._GameSettingsPage.RegExportTitle; - public string RegExportTooltip { get; set; } = LangFallback?._GameSettingsPage.RegExportTooltip; - public string RegImportTitle { get; set; } = LangFallback?._GameSettingsPage.RegImportTitle; - public string RegImportTooltip { get; set; } = LangFallback?._GameSettingsPage.RegImportTooltip; - public string OverlayNotInstalledTitle { get; set; } = LangFallback?._GameSettingsPage.OverlayNotInstalledTitle; - public string OverlayNotInstalledSubtitle { get; set; } = LangFallback?._GameSettingsPage.OverlayNotInstalledSubtitle; - public string OverlayGameRunningTitle { get; set; } = LangFallback?._GameSettingsPage.OverlayGameRunningTitle; - public string OverlayGameRunningSubtitle { get; set; } = LangFallback?._GameSettingsPage.OverlayGameRunningSubtitle; - public string OverlayFirstTimeTitle { get; set; } = LangFallback?._GameSettingsPage.OverlayFirstTimeTitle; - public string OverlayFirstTimeSubtitle { get; set; } = LangFallback?._GameSettingsPage.OverlayFirstTimeSubtitle; - public string CustomArgs_Title { get; set; } = LangFallback?._GameSettingsPage.CustomArgs_Title; - public string CustomArgs_Subtitle { get; set; } = LangFallback?._GameSettingsPage.CustomArgs_Subtitle; - public string CustomArgs_Footer1 { get; set; } = LangFallback?._GameSettingsPage.CustomArgs_Footer1; - public string CustomArgs_Footer2 { get; set; } = LangFallback?._GameSettingsPage.CustomArgs_Footer2; - public string CustomArgs_Footer3 { get; set; } = LangFallback?._GameSettingsPage.CustomArgs_Footer3; - public string GameBoost { get; set; } = LangFallback?._GameSettingsPage.GameBoost; + public string Graphics_ResSelectPlaceholder { get; set; } = LangFallback?._GameSettingsPage.Graphics_ResSelectPlaceholder; + public string Graphics_ResCustom { get; set; } = LangFallback?._GameSettingsPage.Graphics_ResCustom; + public string Graphics_ResCustomW { get; set; } = LangFallback?._GameSettingsPage.Graphics_ResCustomW; + public string Graphics_ResCustomH { get; set; } = LangFallback?._GameSettingsPage.Graphics_ResCustomH; + public string Graphics_FPSPanel { get; set; } = LangFallback?._GameSettingsPage.Graphics_FPSPanel; + public string Graphics_FPSInCombat { get; set; } = LangFallback?._GameSettingsPage.Graphics_FPSInCombat; + public string Graphics_FPSInMenu { get; set; } = LangFallback?._GameSettingsPage.Graphics_FPSInMenu; + public string Graphics_APIPanel { get; set; } = LangFallback?._GameSettingsPage.Graphics_APIPanel; + public string Graphics_APIHelp1 { get; set; } = LangFallback?._GameSettingsPage.Graphics_APIHelp1; + public string Graphics_APIHelp2 { get; set; } = LangFallback?._GameSettingsPage.Graphics_APIHelp2; + public string Graphics_APIHelp3 { get; set; } = LangFallback?._GameSettingsPage.Graphics_APIHelp3; + public string Graphics_SpecPanel { get; set; } = LangFallback?._GameSettingsPage.Graphics_SpecPanel; + public string Graphics_Preset { get; set; } = LangFallback?._GameSettingsPage.Graphics_Preset; + public string Graphics_Render { get; set; } = LangFallback?._GameSettingsPage.Graphics_Render; + public string Graphics_Shadow { get; set; } = LangFallback?._GameSettingsPage.Graphics_Shadow; + public string Graphics_Reflection { get; set; } = LangFallback?._GameSettingsPage.Graphics_Reflection; + public string Graphics_FX { get; set; } = LangFallback?._GameSettingsPage.Graphics_FX; + public string Graphics_FXPost { get; set; } = LangFallback?._GameSettingsPage.Graphics_FXPost; + public string Graphics_FXPhysics { get; set; } = LangFallback?._GameSettingsPage.Graphics_FXPhysics; + public string Graphics_FXHDR { get; set; } = LangFallback?._GameSettingsPage.Graphics_FXHDR; + public string Graphics_FXHQ { get; set; } = LangFallback?._GameSettingsPage.Graphics_FXHQ; + public string Graphics_FXAA { get; set; } = LangFallback?._GameSettingsPage.Graphics_FXAA; + public string Graphics_FXDistort { get; set; } = LangFallback?._GameSettingsPage.Graphics_FXDistort; + public string Graphics_APHO2Panel { get; set; } = LangFallback?._GameSettingsPage.Graphics_APHO2Panel; + public string Graphics_APHO2GI { get; set; } = LangFallback?._GameSettingsPage.Graphics_APHO2GI; + public string Graphics_APHO2VL { get; set; } = LangFallback?._GameSettingsPage.Graphics_APHO2VL; + public string Graphics_APHO2AO { get; set; } = LangFallback?._GameSettingsPage.Graphics_APHO2AO; + public string Graphics_APHO2LOD { get; set; } = LangFallback?._GameSettingsPage.Graphics_APHO2LOD; + public string SpecDisabled { get; set; } = LangFallback?._GameSettingsPage.SpecDisabled; + public string SpecLow { get; set; } = LangFallback?._GameSettingsPage.SpecLow; + public string SpecMedium { get; set; } = LangFallback?._GameSettingsPage.SpecMedium; + public string SpecHigh { get; set; } = LangFallback?._GameSettingsPage.SpecHigh; + public string SpecVeryHigh { get; set; } = LangFallback?._GameSettingsPage.SpecVeryHigh; + public string SpecMaximum { get; set; } = LangFallback?._GameSettingsPage.SpecMaximum; + public string Audio_Title { get; set; } = LangFallback?._GameSettingsPage.Audio_Title; + public string Audio_Mute { get; set; } = LangFallback?._GameSettingsPage.Audio_Mute; + public string Audio_Master { get; set; } = LangFallback?._GameSettingsPage.Audio_Master; + public string Audio_BGM { get; set; } = LangFallback?._GameSettingsPage.Audio_BGM; + public string Audio_SFX { get; set; } = LangFallback?._GameSettingsPage.Audio_SFX; + public string Audio_VOLang { get; set; } = LangFallback?._GameSettingsPage.Audio_VOLang; + public string Audio_VOLang1 { get; set; } = LangFallback?._GameSettingsPage.Audio_VOLang1; + public string Audio_VOLang2 { get; set; } = LangFallback?._GameSettingsPage.Audio_VOLang2; + public string Audio_VODefault { get; set; } = LangFallback?._GameSettingsPage.Audio_VODefault; + public string Audio_VO { get; set; } = LangFallback?._GameSettingsPage.Audio_VO; + public string Audio_Elf { get; set; } = LangFallback?._GameSettingsPage.Audio_Elf; + public string Audio_Cutscenes { get; set; } = LangFallback?._GameSettingsPage.Audio_Cutscenes; + public string ApplyBtn { get; set; } = LangFallback?._GameSettingsPage.ApplyBtn; + public string SettingsApplied { get; set; } = LangFallback?._GameSettingsPage.SettingsApplied; + public string SettingsRegExported { get; set; } = LangFallback?._GameSettingsPage.SettingsRegExported; + public string SettingsRegExportTitle { get; set; } = LangFallback?._GameSettingsPage.SettingsRegExportTitle; + public string SettingsRegImported { get; set; } = LangFallback?._GameSettingsPage.SettingsRegImported; + public string SettingsRegImportTitle { get; set; } = LangFallback?._GameSettingsPage.SettingsRegImportTitle; + public string SettingsRegErr1 { get; set; } = LangFallback?._GameSettingsPage.SettingsRegErr1; + public string SettingsRegErr2 { get; set; } = LangFallback?._GameSettingsPage.SettingsRegErr2; + public string RegImportExport { get; set; } = LangFallback?._GameSettingsPage.RegImportExport; + public string RegExportTitle { get; set; } = LangFallback?._GameSettingsPage.RegExportTitle; + public string RegExportTooltip { get; set; } = LangFallback?._GameSettingsPage.RegExportTooltip; + public string RegImportTitle { get; set; } = LangFallback?._GameSettingsPage.RegImportTitle; + public string RegImportTooltip { get; set; } = LangFallback?._GameSettingsPage.RegImportTooltip; + public string OverlayNotInstalledTitle { get; set; } = LangFallback?._GameSettingsPage.OverlayNotInstalledTitle; + public string OverlayNotInstalledSubtitle { get; set; } = LangFallback?._GameSettingsPage.OverlayNotInstalledSubtitle; + public string OverlayGameRunningTitle { get; set; } = LangFallback?._GameSettingsPage.OverlayGameRunningTitle; + public string OverlayGameRunningSubtitle { get; set; } = LangFallback?._GameSettingsPage.OverlayGameRunningSubtitle; + public string OverlayFirstTimeTitle { get; set; } = LangFallback?._GameSettingsPage.OverlayFirstTimeTitle; + public string OverlayFirstTimeSubtitle { get; set; } = LangFallback?._GameSettingsPage.OverlayFirstTimeSubtitle; + public string CustomArgs_Title { get; set; } = LangFallback?._GameSettingsPage.CustomArgs_Title; + public string CustomArgs_Subtitle { get; set; } = LangFallback?._GameSettingsPage.CustomArgs_Subtitle; + public string CustomArgs_Footer1 { get; set; } = LangFallback?._GameSettingsPage.CustomArgs_Footer1; + public string CustomArgs_Footer2 { get; set; } = LangFallback?._GameSettingsPage.CustomArgs_Footer2; + public string CustomArgs_Footer3 { get; set; } = LangFallback?._GameSettingsPage.CustomArgs_Footer3; + public string GameBoost { get; set; } = LangFallback?._GameSettingsPage.GameBoost; + public string Advanced_Title { get; set; } = LangFallback?._GameSettingsPage.Advanced_Title; + public string Advanced_Subtitle1 { get; set; } = LangFallback?._GameSettingsPage.Advanced_Subtitle1; + public string Advanced_Subtitle2 { get; set; } = LangFallback?._GameSettingsPage.Advanced_Subtitle2; + public string Advanced_Subtitle3 { get; set; } = LangFallback?._GameSettingsPage.Advanced_Subtitle3; + public string Advanced_GLC_WarningAdmin { get; set; } = LangFallback?._GameSettingsPage.Advanced_GLC_WarningAdmin; + public string Advanced_GLC_PreLaunch_Title { get; set; } = LangFallback?._GameSettingsPage.Advanced_GLC_PreLaunch_Title; + public string Advanced_GLC_PreLaunch_Subtitle { get; set; } = LangFallback?._GameSettingsPage.Advanced_GLC_PreLaunch_Subtitle; + public string Advanced_GLC_PreLaunch_Exit { get; set; } = LangFallback?._GameSettingsPage.Advanced_GLC_PreLaunch_Exit; + public string Advanced_GLC_PostExit_Title { get; set; } = LangFallback?._GameSettingsPage.Advanced_GLC_PostExit_Title; + public string Advanced_GLC_PostExit_Subtitle { get; set; } = LangFallback?._GameSettingsPage.Advanced_GLC_PostExit_Subtitle; } } #endregion diff --git a/Hi3Helper.Core/Lang/Locale/LangStarRailGameSettingsPage.cs b/Hi3Helper.Core/Lang/Locale/LangStarRailGameSettingsPage.cs index d6892ad72..dc7bff364 100644 --- a/Hi3Helper.Core/Lang/Locale/LangStarRailGameSettingsPage.cs +++ b/Hi3Helper.Core/Lang/Locale/LangStarRailGameSettingsPage.cs @@ -8,66 +8,67 @@ public sealed partial class LocalizationParams public LangStarRailGameSettingsPage _StarRailGameSettingsPage { get; set; } = LangFallback?._StarRailGameSettingsPage; public sealed class LangStarRailGameSettingsPage { - public string PageTitle { get; set; } = LangFallback?._StarRailGameSettingsPage.PageTitle; - public string Graphics_Title { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_Title; - public string Graphics_ResolutionPanel { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ResolutionPanel; - public string Graphics_Fullscreen { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_Fullscreen; - public string Graphics_ExclusiveFullscreen { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ExclusiveFullscreen; + public string PageTitle { get; set; } = LangFallback?._StarRailGameSettingsPage.PageTitle; + public string Graphics_Title { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_Title; + public string Graphics_ResolutionPanel { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ResolutionPanel; + public string Graphics_Fullscreen { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_Fullscreen; + public string Graphics_ExclusiveFullscreen { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ExclusiveFullscreen; public string Graphics_ResSelectPlaceholder { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ResSelectPlaceholder; - public string Graphics_ResCustom { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ResCustom; - public string Graphics_ResCustomTooltip { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ResCustomTooltip; - public string Graphics_ResCustomW { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ResCustomW; - public string Graphics_ResCustomH { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ResCustomH; - public string OverlayNotInstalledTitle { get; set; } = LangFallback?._StarRailGameSettingsPage.OverlayNotInstalledTitle; - public string OverlayNotInstalledSubtitle { get; set; } = LangFallback?._StarRailGameSettingsPage.OverlayNotInstalledSubtitle; - public string OverlayGameRunningTitle { get; set; } = LangFallback?._StarRailGameSettingsPage.OverlayGameRunningTitle; - public string OverlayGameRunningSubtitle { get; set; } = LangFallback?._StarRailGameSettingsPage.OverlayGameRunningSubtitle; - public string OverlayFirstTimeTitle { get; set; } = LangFallback?._StarRailGameSettingsPage.OverlayFirstTimeTitle; - public string OverlayFirstTimeSubtitle { get; set; } = LangFallback?._StarRailGameSettingsPage.OverlayFirstTimeSubtitle; - public string CustomArgs_Title { get; set; } = LangFallback?._StarRailGameSettingsPage.CustomArgs_Title; - public string CustomArgs_Subtitle { get; set; } = LangFallback?._StarRailGameSettingsPage.CustomArgs_Subtitle; - public string CustomArgs_Footer1 { get; set; } = LangFallback?._StarRailGameSettingsPage.CustomArgs_Footer1; - public string CustomArgs_Footer2 { get; set; } = LangFallback?._StarRailGameSettingsPage.CustomArgs_Footer2; - public string CustomArgs_Footer3 { get; set; } = LangFallback?._StarRailGameSettingsPage.CustomArgs_Footer3; - public string ApplyBtn { get; set; } = LangFallback?._StarRailGameSettingsPage.ApplyBtn; - public string SettingsApplied { get; set; } = LangFallback?._StarRailGameSettingsPage.SettingsApplied; - public string Audio_Title { get; set; } = LangFallback?._StarRailGameSettingsPage.Audio_Title; - public string Audio_Master { get; set; } = LangFallback?._StarRailGameSettingsPage.Audio_Master; - public string Audio_BGM { get; set; } = LangFallback?._StarRailGameSettingsPage.Audio_BGM; - public string Audio_SFX { get; set; } = LangFallback?._StarRailGameSettingsPage.Audio_SFX; - public string Audio_VO { get; set; } = LangFallback?._StarRailGameSettingsPage.Audio_VO; - public string Audio_Mute { get; set; } = LangFallback?._StarRailGameSettingsPage.Audio_Mute; - public string Language { get; set; } = LangFallback?._StarRailGameSettingsPage.Language; - public string Language_Help1 { get; set; } = LangFallback?._StarRailGameSettingsPage.Language_Help1; - public string Language_Help2 { get; set; } = LangFallback?._StarRailGameSettingsPage.Language_Help2; - public string LanguageAudio { get; set; } = LangFallback?._StarRailGameSettingsPage.LanguageAudio; - public string LanguageText { get; set; } = LangFallback?._StarRailGameSettingsPage.LanguageText; - public string VO_en { get; set; } = LangFallback?._StarRailGameSettingsPage.VO_en; - public string VO_cn { get; set; } = LangFallback?._StarRailGameSettingsPage.VO_cn; - public string VO_jp { get; set; } = LangFallback?._StarRailGameSettingsPage.VO_jp; - public string VO_kr { get; set; } = LangFallback?._StarRailGameSettingsPage.VO_kr; - public string Graphics_FPS { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_FPS; - public string Graphics_FPS_Help { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_FPS_Help; - public string Graphics_FPS_Help2 { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_FPS_Help2; - public string Graphics_VSync { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_VSync; - public string Graphics_RenderScale { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_RenderScale; - public string Graphics_ResolutionQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ResolutionQuality; - public string Graphics_ShadowQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ShadowQuality; - public string Graphics_LightQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_LightQuality; - public string Graphics_CharacterQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_CharacterQuality; - public string Graphics_EnvDetailQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_EnvDetailQuality; - public string Graphics_ReflectionQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ReflectionQuality; - public string Graphics_BloomQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_BloomQuality; - public string Graphics_SFXQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_SFXQuality; - public string Graphics_AAMode { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_AAMode; - public string Graphics_SpecPanel { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_SpecPanel; - public string SpecEnabled { get; set; } = LangFallback?._StarRailGameSettingsPage.SpecEnabled; - public string SpecDisabled { get; set; } = LangFallback?._StarRailGameSettingsPage.SpecDisabled; - public string SpecVeryLow { get; set; } = LangFallback?._StarRailGameSettingsPage.SpecVeryLow; - public string SpecLow { get; set; } = LangFallback?._StarRailGameSettingsPage.SpecLow; - public string SpecMedium { get; set; } = LangFallback?._StarRailGameSettingsPage.SpecMedium; - public string SpecHigh { get; set; } = LangFallback?._StarRailGameSettingsPage.SpecHigh; - public string SpecVeryHigh { get; set; } = LangFallback?._StarRailGameSettingsPage.SpecVeryHigh; + public string Graphics_ResCustom { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ResCustom; + public string Graphics_ResCustomTooltip { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ResCustomTooltip; + public string Graphics_ResCustomW { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ResCustomW; + public string Graphics_ResCustomH { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ResCustomH; + public string OverlayNotInstalledTitle { get; set; } = LangFallback?._StarRailGameSettingsPage.OverlayNotInstalledTitle; + public string OverlayNotInstalledSubtitle { get; set; } = LangFallback?._StarRailGameSettingsPage.OverlayNotInstalledSubtitle; + public string OverlayGameRunningTitle { get; set; } = LangFallback?._StarRailGameSettingsPage.OverlayGameRunningTitle; + public string OverlayGameRunningSubtitle { get; set; } = LangFallback?._StarRailGameSettingsPage.OverlayGameRunningSubtitle; + public string OverlayFirstTimeTitle { get; set; } = LangFallback?._StarRailGameSettingsPage.OverlayFirstTimeTitle; + public string OverlayFirstTimeSubtitle { get; set; } = LangFallback?._StarRailGameSettingsPage.OverlayFirstTimeSubtitle; + public string CustomArgs_Title { get; set; } = LangFallback?._StarRailGameSettingsPage.CustomArgs_Title; + public string CustomArgs_Subtitle { get; set; } = LangFallback?._StarRailGameSettingsPage.CustomArgs_Subtitle; + public string CustomArgs_Footer1 { get; set; } = LangFallback?._StarRailGameSettingsPage.CustomArgs_Footer1; + public string CustomArgs_Footer2 { get; set; } = LangFallback?._StarRailGameSettingsPage.CustomArgs_Footer2; + public string CustomArgs_Footer3 { get; set; } = LangFallback?._StarRailGameSettingsPage.CustomArgs_Footer3; + public string ApplyBtn { get; set; } = LangFallback?._StarRailGameSettingsPage.ApplyBtn; + public string SettingsApplied { get; set; } = LangFallback?._StarRailGameSettingsPage.SettingsApplied; + public string Audio_Title { get; set; } = LangFallback?._StarRailGameSettingsPage.Audio_Title; + public string Audio_Master { get; set; } = LangFallback?._StarRailGameSettingsPage.Audio_Master; + public string Audio_BGM { get; set; } = LangFallback?._StarRailGameSettingsPage.Audio_BGM; + public string Audio_SFX { get; set; } = LangFallback?._StarRailGameSettingsPage.Audio_SFX; + public string Audio_VO { get; set; } = LangFallback?._StarRailGameSettingsPage.Audio_VO; + public string Audio_Mute { get; set; } = LangFallback?._StarRailGameSettingsPage.Audio_Mute; + public string Language { get; set; } = LangFallback?._StarRailGameSettingsPage.Language; + public string Language_Help1 { get; set; } = LangFallback?._StarRailGameSettingsPage.Language_Help1; + public string Language_Help2 { get; set; } = LangFallback?._StarRailGameSettingsPage.Language_Help2; + public string LanguageAudio { get; set; } = LangFallback?._StarRailGameSettingsPage.LanguageAudio; + public string LanguageText { get; set; } = LangFallback?._StarRailGameSettingsPage.LanguageText; + public string VO_en { get; set; } = LangFallback?._StarRailGameSettingsPage.VO_en; + public string VO_cn { get; set; } = LangFallback?._StarRailGameSettingsPage.VO_cn; + public string VO_jp { get; set; } = LangFallback?._StarRailGameSettingsPage.VO_jp; + public string VO_kr { get; set; } = LangFallback?._StarRailGameSettingsPage.VO_kr; + public string Graphics_FPS { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_FPS; + public string Graphics_FPS_Help { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_FPS_Help; + public string Graphics_FPS_Help2 { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_FPS_Help2; + public string Graphics_VSync { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_VSync; + public string Graphics_VSync_Help { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_VSync_Help; + public string Graphics_RenderScale { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_RenderScale; + public string Graphics_ResolutionQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ResolutionQuality; + public string Graphics_ShadowQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ShadowQuality; + public string Graphics_LightQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_LightQuality; + public string Graphics_CharacterQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_CharacterQuality; + public string Graphics_EnvDetailQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_EnvDetailQuality; + public string Graphics_ReflectionQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_ReflectionQuality; + public string Graphics_BloomQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_BloomQuality; + public string Graphics_SFXQuality { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_SFXQuality; + public string Graphics_AAMode { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_AAMode; + public string Graphics_SpecPanel { get; set; } = LangFallback?._StarRailGameSettingsPage.Graphics_SpecPanel; + public string SpecEnabled { get; set; } = LangFallback?._StarRailGameSettingsPage.SpecEnabled; + public string SpecDisabled { get; set; } = LangFallback?._StarRailGameSettingsPage.SpecDisabled; + public string SpecVeryLow { get; set; } = LangFallback?._StarRailGameSettingsPage.SpecVeryLow; + public string SpecLow { get; set; } = LangFallback?._StarRailGameSettingsPage.SpecLow; + public string SpecMedium { get; set; } = LangFallback?._StarRailGameSettingsPage.SpecMedium; + public string SpecHigh { get; set; } = LangFallback?._StarRailGameSettingsPage.SpecHigh; + public string SpecVeryHigh { get; set; } = LangFallback?._StarRailGameSettingsPage.SpecVeryHigh; } } #endregion diff --git a/Hi3Helper.Core/Lang/en_US.json b/Hi3Helper.Core/Lang/en_US.json index 344afc07d..25bcee67e 100644 --- a/Hi3Helper.Core/Lang/en_US.json +++ b/Hi3Helper.Core/Lang/en_US.json @@ -327,7 +327,18 @@ "CustomArgs_Footer2": "Unity Standalone Player command line documentation", "CustomArgs_Footer3": "to see more parameters.", - "GameBoost": "Boost Game Priority [Experimental]" + "GameBoost": "Boost Game Priority [Experimental]", + + "Advanced_Title": "Advanced Settings", + "Advanced_Subtitle1": "Collapse Launcher Team", + "Advanced_Subtitle2": "IS NOT RESPONSIBLE", + "Advanced_Subtitle3": "for anything happened to your game, account or system while this settings is in use! Use at your own risk.", + "Advanced_GLC_WarningAdmin": "WARNING: Commands provided will be run as Administrator!", + "Advanced_GLC_PreLaunch_Title": "Pre-Launch Commands", + "Advanced_GLC_PreLaunch_Subtitle": "Commands to be executed before the game is launched", + "Advanced_GLC_PreLaunch_Exit": "Force exit launched process when Game is closed/stopped", + "Advanced_GLC_PostExit_Title": "Post-Exit Commands", + "Advanced_GLC_PostExit_Subtitle": "Commands to be executed after the game is closed" }, "_SettingsPage": { @@ -921,6 +932,7 @@ "Graphics_FPS_Help": "120 FPS is EXPERIMENTAL! Please use with caution as Honkai: Star Rail does not officially support this!", "Graphics_FPS_Help2": "Setting the FPS value to 120 will break the in-game Graphics Settings menu.\r\nIf your menu is broken in-game, use Collapse to change the Game Graphics Settings.", "Graphics_VSync": "VSync", + "Graphics_VSync_Help": "VSync is not available on 120 FPS", "Graphics_RenderScale": "Render Scale", "Graphics_ResolutionQuality": "Resolution Quality", "Graphics_ShadowQuality": "Shadow Quality",