diff --git a/Bloxstrap/Enums/NextAction.cs b/Bloxstrap/Enums/NextAction.cs index cf804f7..607029e 100644 --- a/Bloxstrap/Enums/NextAction.cs +++ b/Bloxstrap/Enums/NextAction.cs @@ -4,6 +4,7 @@ { Terminate, LaunchSettings, - LaunchRoblox + LaunchRoblox, + LaunchRobloxStudio } } diff --git a/Bloxstrap/LaunchHandler.cs b/Bloxstrap/LaunchHandler.cs index cf7f165..a9a60ca 100644 --- a/Bloxstrap/LaunchHandler.cs +++ b/Bloxstrap/LaunchHandler.cs @@ -21,6 +21,10 @@ namespace Bloxstrap LaunchRoblox(LaunchMode.Player); break; + case NextAction.LaunchRobloxStudio: + LaunchRoblox(LaunchMode.Studio); + break; + default: App.Terminate(isUnfinishedInstall ? ErrorCode.ERROR_INSTALL_USEREXIT : ErrorCode.ERROR_SUCCESS); break; diff --git a/Bloxstrap/Resources/Strings.Designer.cs b/Bloxstrap/Resources/Strings.Designer.cs index cf5e6a6..a09298c 100644 --- a/Bloxstrap/Resources/Strings.Designer.cs +++ b/Bloxstrap/Resources/Strings.Designer.cs @@ -1612,6 +1612,15 @@ namespace Bloxstrap.Resources { } } + /// + /// Looks up a localized string similar to Launch Roblox Studio. + /// + public static string LaunchMenu_LaunchRobloxStudio { + get { + return ResourceManager.GetString("LaunchMenu.LaunchRobloxStudio", resourceCulture); + } + } + /// /// Looks up a localized string similar to See the Wiki for help. /// diff --git a/Bloxstrap/Resources/Strings.resx b/Bloxstrap/Resources/Strings.resx index 4d9d54b..c0ccf27 100644 --- a/Bloxstrap/Resources/Strings.resx +++ b/Bloxstrap/Resources/Strings.resx @@ -1236,4 +1236,7 @@ Would you like to enable test mode? Icons Name of the folder that gets created according to the "create shortcut icons" option. Ensure that it is a valid folder name. + + Launch Roblox Studio + \ No newline at end of file diff --git a/Bloxstrap/UI/Elements/Dialogs/LaunchMenuDialog.xaml b/Bloxstrap/UI/Elements/Dialogs/LaunchMenuDialog.xaml index 99e944c..5212c7c 100644 --- a/Bloxstrap/UI/Elements/Dialogs/LaunchMenuDialog.xaml +++ b/Bloxstrap/UI/Elements/Dialogs/LaunchMenuDialog.xaml @@ -64,6 +64,12 @@ + + + + + + diff --git a/Bloxstrap/UI/ViewModels/Dialogs/LaunchMenuViewModel.cs b/Bloxstrap/UI/ViewModels/Dialogs/LaunchMenuViewModel.cs index 25962a9..951f816 100644 --- a/Bloxstrap/UI/ViewModels/Dialogs/LaunchMenuViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Dialogs/LaunchMenuViewModel.cs @@ -1,4 +1,5 @@ -using System.Windows.Input; +using System.Windows; +using System.Windows.Input; using CommunityToolkit.Mvvm.Input; using Bloxstrap.UI.Elements.About; @@ -9,10 +10,14 @@ namespace Bloxstrap.UI.ViewModels.Installer { public string Version => string.Format(Strings.Menu_About_Version, App.Version); + public Visibility ShowRobloxStudioOption => String.IsNullOrEmpty(App.State.Prop.Studio.VersionGuid) ? Visibility.Collapsed : Visibility.Visible; + public ICommand LaunchSettingsCommand => new RelayCommand(LaunchSettings); public ICommand LaunchRobloxCommand => new RelayCommand(LaunchRoblox); + public ICommand LaunchRobloxStudioCommand => new RelayCommand(LaunchRobloxStudio); + public ICommand LaunchAboutCommand => new RelayCommand(LaunchAbout); public event EventHandler? CloseWindowRequest; @@ -21,6 +26,8 @@ namespace Bloxstrap.UI.ViewModels.Installer private void LaunchRoblox() => CloseWindowRequest?.Invoke(this, NextAction.LaunchRoblox); + private void LaunchRobloxStudio() => CloseWindowRequest?.Invoke(this, NextAction.LaunchRobloxStudio); + private void LaunchAbout() => new MainWindow().ShowDialog(); } }