diff --git a/src/MaaWpfGui/Constants/ConfigurationKeys.cs b/src/MaaWpfGui/Constants/ConfigurationKeys.cs index 19b9830545..26cfd93728 100644 --- a/src/MaaWpfGui/Constants/ConfigurationKeys.cs +++ b/src/MaaWpfGui/Constants/ConfigurationKeys.cs @@ -85,6 +85,7 @@ namespace MaaWpfGui.Constants public const string TouchMode = "Connect.TouchMode"; public const string AdbReplaced = "Connect.AdbReplaced"; + public const string StartGame = "Start.StartGame"; public const string ClientType = "Start.ClientType"; public const string AccountName = "Start.AccountName"; public const string RunDirectly = "Start.RunDirectly"; diff --git a/src/MaaWpfGui/Res/Localizations/en-us.xaml b/src/MaaWpfGui/Res/Localizations/en-us.xaml index afd65ef463..18f2c1be01 100644 --- a/src/MaaWpfGui/Res/Localizations/en-us.xaml +++ b/src/MaaWpfGui/Res/Localizations/en-us.xaml @@ -349,6 +349,7 @@ You can cancel this popup by clicking the 「{key=Settings} - {key=IssueReport} Auto Run task after launched Auto Minimize after launched Client Type + Launch Client on Start Restart when game disconnects The adaptation for Overseas clients is very difficult and we need your help! No programming knowledge is required. Startup Emulator after launched diff --git a/src/MaaWpfGui/Res/Localizations/ja-jp.xaml b/src/MaaWpfGui/Res/Localizations/ja-jp.xaml index da3ae9e3e5..078386e9b2 100644 --- a/src/MaaWpfGui/Res/Localizations/ja-jp.xaml +++ b/src/MaaWpfGui/Res/Localizations/ja-jp.xaml @@ -350,6 +350,7 @@ アプリの起動時に自動的に実行 アプリの起動時に自動的に最小化 クライアントバージョン + 起動時にクライアントを開始する ゲームが切断されたときに自動的に再接続する グローバルサーバーの対応は非常に大変で、皆様の協力が必要です!プログラミングの知識は必要ありません。 起動時にエミュレータ自動起動 diff --git a/src/MaaWpfGui/Res/Localizations/ko-kr.xaml b/src/MaaWpfGui/Res/Localizations/ko-kr.xaml index c43537d9a1..c3c6f82b40 100644 --- a/src/MaaWpfGui/Res/Localizations/ko-kr.xaml +++ b/src/MaaWpfGui/Res/Localizations/ko-kr.xaml @@ -349,6 +349,7 @@ MAA 실행 후 작업 자동 시작 MAA 실행 후 최소화 클라이언트 종류 + 시작 시 클라이언트를 실행 게임 연결이 끊어지면 자동으로 다시 연결 해외 서버의 현지화는 어려운 작업입니다! 저희를 도와주세요! 전문 지식이 없어도 됩니다. MAA 실행 후 에뮬레이터를 실행 diff --git a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml index 7418ed47b1..f9c50e8153 100644 --- a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml +++ b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml @@ -350,6 +350,7 @@ 启动 MAA 后直接运行 启动 MAA 后直接最小化 客户端类型 + 是否启动客户端 游戏掉线时自动重连 外服适配滞销,帮帮我们!不会编程也可以。 启动 MAA 后自动开启模拟器 diff --git a/src/MaaWpfGui/Res/Localizations/zh-tw.xaml b/src/MaaWpfGui/Res/Localizations/zh-tw.xaml index 8a4c4d9345..c05b33e941 100644 --- a/src/MaaWpfGui/Res/Localizations/zh-tw.xaml +++ b/src/MaaWpfGui/Res/Localizations/zh-tw.xaml @@ -348,6 +348,7 @@ 啟動 MAA 後直接執行 啟動 MAA 後直接最小化 用戶端類型 + 是否啟動客戶端 遊戲斷線時自動重連 外服適配滯銷,幫幫我們!不會程式也可以。 啟動 MAA 後自動開啟模擬器 diff --git a/src/MaaWpfGui/ViewModels/UserControl/Settings/GameSettingsUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/Settings/GameSettingsUserControlModel.cs index 30771dfcd5..8e7882e448 100644 --- a/src/MaaWpfGui/ViewModels/UserControl/Settings/GameSettingsUserControlModel.cs +++ b/src/MaaWpfGui/ViewModels/UserControl/Settings/GameSettingsUserControlModel.cs @@ -41,6 +41,18 @@ public class GameSettingsUserControlModel : PropertyChangedBase private static VersionUpdateSettingsUserControlModel VersionUpdateSettings => SettingsViewModel.VersionUpdateSettings; + private bool _startGame = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.StartGame, bool.TrueString)); + + public bool StartGame + { + get => _startGame; + set + { + SetAndNotify(ref _startGame, value); + ConfigurationHelper.SetValue(ConfigurationKeys.StartGame, value.ToString()); + } + } + /// /// Gets the list of the client types. /// diff --git a/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/StartUpSettingsUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/StartUpSettingsUserControlModel.cs index 0bf49ad5d1..597717952d 100644 --- a/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/StartUpSettingsUserControlModel.cs +++ b/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/StartUpSettingsUserControlModel.cs @@ -65,6 +65,7 @@ public class StartUpSettingsUserControlModel : TaskViewModel public override (AsstTaskType Type, JObject Params) Serialize() { var clientType = SettingsViewModel.GameSettings.ClientType; + var startGame = SettingsViewModel.GameSettings.StartGame; var accountName = clientType switch { "Official" or "Bilibili" => AccountName, @@ -74,7 +75,7 @@ public class StartUpSettingsUserControlModel : TaskViewModel var task = new AsstStartUpTask() { ClientType = clientType, - StartGame = !string.IsNullOrEmpty(clientType), + StartGame = startGame, AccountName = accountName, }; diff --git a/src/MaaWpfGui/Views/UserControl/TaskQueue/StartUpTaskUserControl.xaml b/src/MaaWpfGui/Views/UserControl/TaskQueue/StartUpTaskUserControl.xaml index 48678e7f46..c86fb362a9 100644 --- a/src/MaaWpfGui/Views/UserControl/TaskQueue/StartUpTaskUserControl.xaml +++ b/src/MaaWpfGui/Views/UserControl/TaskQueue/StartUpTaskUserControl.xaml @@ -36,6 +36,7 @@ + + + + + @@ -132,6 +150,7 @@ SelectedValue="{Binding ConnectConfig}" SelectedValuePath="Value" Visibility="{c:Binding !AutoDetectConnection}" /> + - - -