Skip to content

Commit

Permalink
disable startup arguments while custom execuable enabled & remove sta…
Browse files Browse the repository at this point in the history
…rtup argument from game setting page #501
  • Loading branch information
Scighost committed Dec 25, 2023
1 parent 3aed70b commit 94f8c98
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 24 deletions.
16 changes: 1 addition & 15 deletions src/Starward/Pages/GameSettingPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,8 @@
IsHitTestVisible="False" />

<StackPanel Margin="0,0,12,0" Visibility="{x:Bind IsBaseSettingEnable}">
<!-- 启动参数 -->
<TextBlock FontSize="20"
FontWeight="Bold"
Text="{x:Bind lang:Lang.GameSettingPage_StartArguments}" />
<TextBox Margin="0,12,0,0"
HorizontalAlignment="Stretch"
IsSpellCheckEnabled="False"
Text="{x:Bind StartArgument, Mode=TwoWay}" />
<!-- 关于启动参数的信息请查看 {nity Standalone Player Command Line Arguments} -->
<TextBlock Name="TextBlock_StartArgumentDesc"
Margin="0,8,0,0"
TextWrapping="Wrap" />

<!-- 分辨率 -->
<TextBlock Margin="0,20,0,0"
FontSize="20"
<TextBlock FontSize="20"
FontWeight="Bold"
Text="{x:Bind lang:Lang.GameSettingPage_Resolution}" />
<!-- 全屏 -->
Expand Down
6 changes: 0 additions & 6 deletions src/Starward/Pages/GameSettingPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Microsoft.UI.Xaml.Media.Imaging;
using Microsoft.UI.Xaml.Navigation;
using Starward.Core;
using Starward.Helpers;
using Starward.Models.GameSetting;
using Starward.Services;
using System;
Expand Down Expand Up @@ -38,11 +37,6 @@ public sealed partial class GameSettingPage : Page
public GameSettingPage()
{
this.InitializeComponent();
TextBlockHelper.Inlines(
TextBlock_StartArgumentDesc.Inlines,
// 关于启动参数的信息请查看 {Unity Standalone Player Command Line Arguments}
Lang.GameSettingPage_StartArgumentDesc,
("{Unity Standalone Player Command Line Arguments}", "https://docs.unity3d.com/Manual/PlayerCommandLineArguments.html"));
}


Expand Down
22 changes: 19 additions & 3 deletions src/Starward/Pages/LauncherPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -643,12 +643,28 @@
Height="0"
IsHitTestVisible="False" />

<TextBlock Margin="0,12,0,0"
FontWeight="SemiBold"
Text="{x:Bind lang:Lang.GameSettingPage_StartArguments}" />
<StackPanel Margin="0,12,0,0" Orientation="Horizontal">

<TextBlock FontWeight="SemiBold" Text="{x:Bind lang:Lang.GameSettingPage_StartArguments}" />
<Button Margin="8,2,0,0"
Padding="2"
Style="{ThemeResource DateTimePickerFlyoutButtonStyle}">
<FontIcon FontSize="14"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Glyph="&#xE9CE;" />
<Button.Flyout>
<Flyout>
<TextBlock Name="TextBlock_StartArgumentDesc"
MaxWidth="360"
TextWrapping="Wrap" />
</Flyout>
</Button.Flyout>
</Button>
</StackPanel>
<TextBox MinWidth="320"
Margin="0,8,0,0"
HorizontalAlignment="Left"
IsEnabled="{x:Bind EnableThirdPartyTool, Converter={StaticResource BoolReversedConverter}}"
IsSpellCheckEnabled="False"
Text="{x:Bind StartGameArgument, Mode=TwoWay}"
TextWrapping="Wrap" />
Expand Down
5 changes: 5 additions & 0 deletions src/Starward/Pages/LauncherPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ public LauncherPage()
{
this.InitializeComponent();

TextBlockHelper.Inlines(
TextBlock_StartArgumentDesc.Inlines,
Lang.GameSettingPage_StartArgumentDesc,
("{Unity Standalone Player Command Line Arguments}", "https://docs.unity3d.com/Manual/PlayerCommandLineArguments.html"));

if (AppConfig.WindowSizeMode > 0)
{
Grid_BannerAndPost.Width = 364;
Expand Down

0 comments on commit 94f8c98

Please sign in to comment.