From df044eef5fc129b6a02d26d94f9bb62dbeee39ad Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Fri, 28 Jun 2024 19:03:52 +0400 Subject: [PATCH] Add ability to toggle Fast Flag manager --- Bloxstrap/Bootstrapper.cs | 3 +++ Bloxstrap/Models/Settings.cs | 1 + Bloxstrap/Resources/Strings.Designer.cs | 22 +++++++++++++++++-- Bloxstrap/Resources/Strings.resx | 5 +++++ .../UI/Elements/Menu/Pages/FastFlagsPage.xaml | 10 +++++++-- .../UI/ViewModels/Menu/FastFlagsViewModel.cs | 6 +++++ 6 files changed, 43 insertions(+), 4 deletions(-) diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index 81af52c..e7453f7 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -1258,6 +1258,9 @@ namespace Bloxstrap continue; } + if (!App.Settings.Prop.UseFastFlagManager && String.Equals(relativeFile, "ClientSettings\\ClientAppSettings.json", StringComparison.OrdinalIgnoreCase)) + continue; + if (relativeFile.EndsWith(".lock")) continue; diff --git a/Bloxstrap/Models/Settings.cs b/Bloxstrap/Models/Settings.cs index 1f51a17..3bc2580 100644 --- a/Bloxstrap/Models/Settings.cs +++ b/Bloxstrap/Models/Settings.cs @@ -15,6 +15,7 @@ namespace Bloxstrap.Models public bool ConfirmLaunches { get; set; } = false; public string Locale { get; set; } = "nil"; public bool ForceRobloxLanguage { get; set; } = false; + public bool UseFastFlagManager { get; set; } = true; // channel configuration public string Channel { get; set; } = RobloxDeployment.DefaultChannel; diff --git a/Bloxstrap/Resources/Strings.Designer.cs b/Bloxstrap/Resources/Strings.Designer.cs index b015b60..66cb509 100644 --- a/Bloxstrap/Resources/Strings.Designer.cs +++ b/Bloxstrap/Resources/Strings.Designer.cs @@ -1878,7 +1878,7 @@ namespace Bloxstrap.Resources { /// /// Looks up a localized string similar to Fast Flags are extremely powerful, being that they are intended to only be used by Roblox engineers. While they can be very useful, manually configuring them can cause serious issues with stability and functionality. Do NOT use the editor if you are unsure of what you are doing. /// - ///Do NOT use this to import large "flag lists" made by other people that promise to improve performance or such. They are subject to the aforementioned issues, and they will cause problems for you since you will not be fully aware [rest of string was truncated]";. + ///Do NOT use this to import large "flag lists" made by other people that promise to improve performance or such. They are subject to the aforementioned issues, and they will cause problems for you since you will not be fully aware of [rest of string was truncated]";. /// public static string Menu_FastFlagEditor_Warning_Text { get { @@ -1913,6 +1913,24 @@ namespace Bloxstrap.Resources { } } + /// + /// Looks up a localized string similar to Choose whether to allow Bloxstrap to manage Fast Flags. + /// + public static string Menu_FastFlags_ManagerEnabled_Description { + get { + return ResourceManager.GetString("Menu.FastFlags.ManagerEnabled.Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enable Fast Flag manager. + /// + public static string Menu_FastFlags_ManagerEnabled_Title { + get { + return ResourceManager.GetString("Menu.FastFlags.ManagerEnabled.Title", resourceCulture); + } + } + /// /// Looks up a localized string similar to Toggle between using the consolidated 1-10 / fine-grained 1-21 graphics quality slider.. /// @@ -1941,7 +1959,7 @@ namespace Bloxstrap.Resources { } /// - /// Looks up a localized string similar to UI and Layout. + /// Looks up a localized string similar to User Interface and Layout. /// public static string Menu_FastFlags_Presets_Categories_UserInterface { get { diff --git a/Bloxstrap/Resources/Strings.resx b/Bloxstrap/Resources/Strings.resx index 857f94c..50dc774 100644 --- a/Bloxstrap/Resources/Strings.resx +++ b/Bloxstrap/Resources/Strings.resx @@ -1051,4 +1051,9 @@ Scroll for more languages. User Interface and Layout + Enable Fast Flag manager + + + Choose whether Fast Flags configured here should apply to Roblox + \ No newline at end of file diff --git a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml index c919d7d..c168081 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml +++ b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml @@ -15,14 +15,20 @@ - + + + + + - + Visibility.Collapsed; #endif + public bool UseFastFlagManager + { + get => App.Settings.Prop.UseFastFlagManager; + set => App.Settings.Prop.UseFastFlagManager = value; + } + public bool HttpRequestLogging { get => App.FastFlags.GetPreset("HTTP.Log") is not null;