diff --git a/src/Snap.Hutao/Snap.Hutao/Control/Theme/ItemsPanelTemplate.xaml b/src/Snap.Hutao/Snap.Hutao/Control/Theme/ItemsPanelTemplate.xaml index d20b99d6..70b5091f 100644 --- a/src/Snap.Hutao/Snap.Hutao/Control/Theme/ItemsPanelTemplate.xaml +++ b/src/Snap.Hutao/Snap.Hutao/Control/Theme/ItemsPanelTemplate.xaml @@ -14,6 +14,9 @@ + + + public const string LaunchScreenWidth = "Launch.ScreenWidth"; + public const string LaunchIsScreenWidthEnabled = "Launch.IsScreenWidthEnabled"; + /// /// 启动游戏 高度 /// public const string LaunchScreenHeight = "Launch.ScreenHeight"; + public const string LaunchIsScreenHeightEnabled = "Launch.IsScreenHeightEnabled"; + /// /// 启动游戏 解锁帧率 /// @@ -93,6 +97,8 @@ internal sealed partial class SettingEntry /// public const string LaunchMonitor = "Launch.Monitor"; + public const string LaunchIsMonitorEnabled = "Launch.IsMonitorEnabled"; + /// /// 启动游戏 多倍启动 /// diff --git a/src/Snap.Hutao/Snap.Hutao/Service/Game/LaunchOptions.cs b/src/Snap.Hutao/Snap.Hutao/Service/Game/LaunchOptions.cs index 71fe1fcd..c086cd15 100644 --- a/src/Snap.Hutao/Snap.Hutao/Service/Game/LaunchOptions.cs +++ b/src/Snap.Hutao/Snap.Hutao/Service/Game/LaunchOptions.cs @@ -27,10 +27,13 @@ internal sealed class LaunchOptions : DbStoreOptions private bool? isBorderless; private bool? isExclusive; private int? screenWidth; + private bool? isScreenWidthEnabled; private int? screenHeight; + private bool? isScreenHeightEnabled; private bool? unlockFps; private int? targetFps; private NameValue? monitor; + private bool? isMonitorEnabled; /// /// 构造一个新的启动游戏选项 @@ -83,6 +86,12 @@ internal sealed class LaunchOptions : DbStoreOptions set => SetOption(ref screenWidth, SettingEntry.LaunchScreenWidth, value); } + public bool IsScreenWidthEnabled + { + get => GetOption(ref isScreenWidthEnabled, SettingEntry.LaunchIsScreenWidthEnabled, true); + set => SetOption(ref isScreenWidthEnabled, SettingEntry.LaunchIsScreenWidthEnabled, value); + } + /// /// 屏幕高度 /// @@ -92,6 +101,12 @@ internal sealed class LaunchOptions : DbStoreOptions set => SetOption(ref screenHeight, SettingEntry.LaunchScreenHeight, value); } + public bool IsScreenHeightEnabled + { + get => GetOption(ref isScreenHeightEnabled, SettingEntry.LaunchIsScreenHeightEnabled, true); + set => SetOption(ref isScreenHeightEnabled, SettingEntry.LaunchIsScreenHeightEnabled, value); + } + /// /// 是否全屏 /// @@ -131,6 +146,12 @@ internal sealed class LaunchOptions : DbStoreOptions } } + public bool IsMonitorEnabled + { + get => GetOption(ref isMonitorEnabled, SettingEntry.LaunchIsMonitorEnabled, true); + set => SetOption(ref isMonitorEnabled, SettingEntry.LaunchIsMonitorEnabled, value); + } + private static void InitializeMonitors(List> monitors) { // This list can't use foreach diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/GachaLogPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/GachaLogPage.xaml index ec1d56b2..0f12787f 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Page/GachaLogPage.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Page/GachaLogPage.xaml @@ -137,6 +137,89 @@ IsLoading="{Binding HutaoCloudViewModel.IsInitialized, Converter={StaticResource BoolNegationConverter}}"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -232,100 +315,10 @@ OpenPaneLength="323" PaneBackground="Transparent"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -347,91 +340,35 @@ - - - - - - - - - - - - - - + - - - - - - - - - - - - + - - - - - - - - - - - - + @@ -444,55 +381,19 @@ Margin="0,16,0,8" Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewControlStatisticsCardOrangeText}"/> - - - - - - - - - - - - + - - - - - - - - - - - - + @@ -503,82 +404,28 @@ Margin="0,16,0,8" Style="{StaticResource BaseTextBlockStyle}" Text="{shcm:ResourceString Name=ViewControlStatisticsCardOrangeText}"/> - - - - - - - - - - - - + - - - - - - - - - - - - + - - - - - - - - - - - - + diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml index 74de57d6..fe5be18d 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml @@ -26,6 +26,14 @@ Collapsed + + + + - + + + + - + + + + - + + + + @@ -266,33 +286,19 @@ DataContext="{Binding GameResource.PreDownloadGame.Latest, Mode=OneWay}" Header="{shcm:ResourceString Name=ViewPageLaunchGameResourcePreDownloadHeader}" Visibility="{Binding FallbackValue={StaticResource VisibilityCollapsed}, Converter={StaticResource EmptyObjectToVisibilityConverter}}"/> - - - - - - - + - - - - - - - +