mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 18:11:27 -07:00
Make launch confirmation optional
This commit is contained in:
parent
cd34f2a108
commit
66b0b58fec
@ -204,13 +204,13 @@ namespace Bloxstrap
|
||||
if (!IsFirstRun)
|
||||
ShouldSaveConfigs = true;
|
||||
|
||||
if (Mutex.TryOpenExisting("ROBLOX_singletonMutex", out var _))
|
||||
if (Settings.Prop.ConfirmLaunches && Mutex.TryOpenExisting("ROBLOX_singletonMutex", out var _))
|
||||
{
|
||||
var result = Frontend.ShowMessageBox(
|
||||
"Roblox is currently running, and launching another instance will close it. Are you sure you want to continue launching?",
|
||||
MessageBoxImage.Warning,
|
||||
MessageBoxButton.YesNo
|
||||
);
|
||||
// this currently doesn't work very well since it relies on checking the existence of the singleton mutex
|
||||
// which often hangs around for a few seconds after the window closes
|
||||
// it would be better to have this rely on the activity tracker when we implement IPC in the planned refactoring
|
||||
|
||||
var result = Frontend.ShowMessageBox(Bloxstrap.Resources.Strings.Bootstrapper_ConfirmLaunch, MessageBoxImage.Warning, MessageBoxButton.YesNo);
|
||||
|
||||
if (result != MessageBoxResult.Yes)
|
||||
{
|
||||
|
@ -12,6 +12,7 @@ namespace Bloxstrap.Models
|
||||
public Theme Theme { get; set; } = Theme.Default;
|
||||
public bool CheckForUpdates { get; set; } = true;
|
||||
public bool CreateDesktopIcon { get; set; } = true;
|
||||
public bool ConfirmLaunches { get; set; } = false;
|
||||
|
||||
// channel configuration
|
||||
public string Channel { get; set; } = RobloxDeployment.DefaultChannel;
|
||||
|
27
Bloxstrap/Resources/Strings.Designer.cs
generated
27
Bloxstrap/Resources/Strings.Designer.cs
generated
@ -87,6 +87,15 @@ namespace Bloxstrap.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Roblox is currently running, and launching another instance will close it. Are you sure you want to continue launching?.
|
||||
/// </summary>
|
||||
public static string Bootstrapper_ConfirmLaunch {
|
||||
get {
|
||||
return ResourceManager.GetString("Bootstrapper.ConfirmLaunch", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to It's possible that something is preventing Bloxstrap from connecting to the internet. Please check and try again..
|
||||
/// </summary>
|
||||
@ -1634,6 +1643,24 @@ namespace Bloxstrap.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Prevent against closures of your existing game from accidentally launching another one..
|
||||
/// </summary>
|
||||
public static string Menu_Behaviour_ConfirmLaunches_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("Menu.Behaviour.ConfirmLaunches.Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Prompt to confirm when launching another Roblox instance.
|
||||
/// </summary>
|
||||
public static string Menu_Behaviour_ConfirmLaunches_Title {
|
||||
get {
|
||||
return ResourceManager.GetString("Menu.Behaviour.ConfirmLaunches.Title", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Bloxstrap will place an icon on the desktop that launches Roblox the next time it launches..
|
||||
/// </summary>
|
||||
|
@ -126,6 +126,9 @@
|
||||
<data name="Bootstrapper.AutoUpdateFailed" xml:space="preserve">
|
||||
<value>Bloxstrap was unable to auto-update to {0}. Please update it manually by downloading and running the latest release from the GitHub page.</value>
|
||||
</data>
|
||||
<data name="Bootstrapper.ConfirmLaunch" xml:space="preserve">
|
||||
<value>Roblox is currently running, and launching another instance will close it. Are you sure you want to continue launching?</value>
|
||||
</data>
|
||||
<data name="Bootstrapper.Connectivity.Preventing" xml:space="preserve">
|
||||
<value>It's possible that something is preventing Bloxstrap from connecting to the internet. Please check and try again.</value>
|
||||
</data>
|
||||
@ -650,6 +653,12 @@ Would you like to upgrade your currently installed version?</value>
|
||||
<data name="Menu.Behaviour.AutoUpdate.Title" xml:space="preserve">
|
||||
<value>Automatically update Bloxstrap</value>
|
||||
</data>
|
||||
<data name="Menu.Behaviour.ConfirmLaunches.Description" xml:space="preserve">
|
||||
<value>Prevent against closures of your existing game from accidentally launching another one.</value>
|
||||
</data>
|
||||
<data name="Menu.Behaviour.ConfirmLaunches.Title" xml:space="preserve">
|
||||
<value>Prompt to confirm when launching another Roblox instance</value>
|
||||
</data>
|
||||
<data name="Menu.Behaviour.CreateDesktopIcon.Description" xml:space="preserve">
|
||||
<value>Bloxstrap will place an icon on the desktop that launches Roblox the next time it launches.</value>
|
||||
</data>
|
||||
|
@ -43,5 +43,11 @@
|
||||
</controls:OptionControl.Style>
|
||||
<ui:ToggleSwitch IsChecked="{Binding ForceRobloxReinstallation, Mode=TwoWay}" />
|
||||
</controls:OptionControl>
|
||||
|
||||
<controls:OptionControl
|
||||
Header="{x:Static resources:Strings.Menu_Behaviour_ConfirmLaunches_Title}"
|
||||
Description="{x:Static resources:Strings.Menu_Behaviour_ConfirmLaunches_Description}">
|
||||
<ui:ToggleSwitch IsChecked="{Binding ConfirmLaunches, Mode=TwoWay}" />
|
||||
</controls:OptionControl>
|
||||
</StackPanel>
|
||||
</ui:UiPage>
|
||||
|
@ -17,6 +17,12 @@
|
||||
set => App.Settings.Prop.CheckForUpdates = value;
|
||||
}
|
||||
|
||||
public bool ConfirmLaunches
|
||||
{
|
||||
get => App.Settings.Prop.ConfirmLaunches;
|
||||
set => App.Settings.Prop.ConfirmLaunches = value;
|
||||
}
|
||||
|
||||
public bool ForceRobloxReinstallation
|
||||
{
|
||||
// wouldnt it be better to check old version guids?
|
||||
|
Loading…
Reference in New Issue
Block a user