diff --git a/Bloxstrap/App.xaml b/Bloxstrap/App.xaml index 22d731b..63d723d 100644 --- a/Bloxstrap/App.xaml +++ b/Bloxstrap/App.xaml @@ -36,6 +36,7 @@ + diff --git a/Bloxstrap/Resources/Strings.Designer.cs b/Bloxstrap/Resources/Strings.Designer.cs index e5e2ae9..8680873 100644 --- a/Bloxstrap/Resources/Strings.Designer.cs +++ b/Bloxstrap/Resources/Strings.Designer.cs @@ -613,7 +613,9 @@ namespace Bloxstrap.Resources { } /// - /// Looks up a localized string similar to Paste in your JSON here.... + /// Looks up a localized string similar to { + /// "FFlagDebugDisplayFPS": "True" + ///}. /// public static string Dialog_BulkAddFastFlag_Paste { get { @@ -1803,6 +1805,15 @@ namespace Bloxstrap.Resources { } } + /// + /// Looks up a localized string similar to An entry for this flag name already exists.. + /// + public static string Menu_FastFlagEditor_AlreadyExists { + get { + return ResourceManager.GetString("Menu.FastFlagEditor.AlreadyExists", resourceCulture); + } + } + /// /// Looks up a localized string similar to Back. /// @@ -1812,6 +1823,35 @@ namespace Bloxstrap.Resources { } } + /// + /// Looks up a localized string similar to Misusing this can lead to instability or unexpected things happening.. + /// + public static string Menu_FastFlagEditor_BannerText { + get { + return ResourceManager.GetString("Menu.FastFlagEditor.BannerText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use with caution.. + /// + public static string Menu_FastFlagEditor_BannerTitle { + get { + return ResourceManager.GetString("Menu.FastFlagEditor.BannerTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Some of the flags you are attempting to import already have set values. Would you like to overwrite their current values with the ones defined in the import? + /// + ///. + /// + public static string Menu_FastFlagEditor_ConflictingImport { + get { + return ResourceManager.GetString("Menu.FastFlagEditor.ConflictingImport", resourceCulture); + } + } + /// /// Looks up a localized string similar to Delete selected. /// @@ -1822,7 +1862,7 @@ namespace Bloxstrap.Resources { } /// - /// Looks up a localized string similar to Manage your own FastFlags. Use with caution. Double click a column to edit.. + /// Looks up a localized string similar to Manage your own FastFlags. Double click a column to edit.. /// public static string Menu_FastFlagEditor_Description { get { @@ -1840,7 +1880,37 @@ namespace Bloxstrap.Resources { } /// - /// Looks up a localized string similar to Copied JSON to clipboard.. + /// Looks up a localized string similar to The name of this flag is not valid as names can only contain letters, numbers, and underscores. + /// + public static string Menu_FastFlagEditor_InvalidCharacter { + get { + return ResourceManager.GetString("Menu.FastFlagEditor.InvalidCharacter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The JSON you've entered does not appear to be valid. Please double check it and try again. + /// + ///More information: + ///{0}. + /// + public static string Menu_FastFlagEditor_InvalidJSON { + get { + return ResourceManager.GetString("Menu.FastFlagEditor.InvalidJSON", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of this flag is not valid as names must start with FFlag, DFInt, etc. + /// + public static string Menu_FastFlagEditor_InvalidPrefix { + get { + return ResourceManager.GetString("Menu.FastFlagEditor.InvalidPrefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copied to clipboard.. /// public static string Menu_FastFlagEditor_JsonCopiedToClipboard { get { @@ -1848,6 +1918,17 @@ namespace Bloxstrap.Resources { } } + /// + /// Looks up a localized string similar to You appear to be importing a very large configuration. You should only be importing configurations that you fully understand. Do NOT blindly paste in configurations made by other people. If you continue, you will very likely end up with stability issues and encounter unexpected changes. + /// + ///Are you sure you want to continue?. + /// + public static string Menu_FastFlagEditor_LargeConfig { + get { + return ResourceManager.GetString("Menu.FastFlagEditor.LargeConfig", resourceCulture); + } + } + /// /// Looks up a localized string similar to Search. /// diff --git a/Bloxstrap/Resources/Strings.resx b/Bloxstrap/Resources/Strings.resx index e5da224..98c90fe 100644 --- a/Bloxstrap/Resources/Strings.resx +++ b/Bloxstrap/Resources/Strings.resx @@ -306,7 +306,9 @@ Your ReShade configuration files will still be saved, and you can locate them by Add FastFlag - Paste in your JSON here... + { + "FFlagDebugDisplayFPS": "True" +} More information: @@ -704,20 +706,51 @@ Would you like to upgrade your currently installed version? Add new + + An entry for this flag name already exists. + Back + + Misusing this can lead to instability or unexpected things happening. + + + Use with caution. + + + Some of the flags you are attempting to import already have set values. Would you like to overwrite their current values with the ones defined in the import? + + + Delete selected - Manage your own FastFlags. Use with caution. Double click a column to edit. + Manage your own FastFlags. Double click a column to edit. Export JSON + + The name of this flag is not valid as names can only contain letters, numbers, and underscores + + + The JSON you've entered does not appear to be valid. Please double check it and try again. + +More information: +{0} + + + The name of this flag is not valid as names must start with FFlag, DFInt, etc + - Copied JSON to clipboard. + Copied to clipboard. + + + You appear to be importing a very large configuration. You should only be importing configurations that you fully understand. Do NOT blindly paste in configurations made by other people. If you continue, you will very likely end up with stability issues and encounter unexpected changes. + +Are you sure you want to continue? Search diff --git a/Bloxstrap/UI/Converters/RangeConverter.cs b/Bloxstrap/UI/Converters/RangeConverter.cs new file mode 100644 index 0000000..64f382a --- /dev/null +++ b/Bloxstrap/UI/Converters/RangeConverter.cs @@ -0,0 +1,29 @@ +using System.Windows.Data; + +namespace Bloxstrap.UI.Converters +{ + internal class RangeConverter : IValueConverter + { + public int? From { get; set; } + + public int? To { get; set; } + + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + int numvalue = (int)value; + + if (From is null) + return numvalue < To; + + if (To is null) + return numvalue > From; + + return numvalue > From && numvalue < To; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Bloxstrap/UI/Elements/Dialogs/AddFastFlagDialog.xaml b/Bloxstrap/UI/Elements/Dialogs/AddFastFlagDialog.xaml index 0e153b9..e7f2a0f 100644 --- a/Bloxstrap/UI/Elements/Dialogs/AddFastFlagDialog.xaml +++ b/Bloxstrap/UI/Elements/Dialogs/AddFastFlagDialog.xaml @@ -6,6 +6,7 @@ xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" xmlns:local="clr-namespace:Bloxstrap.UI.Elements.Dialogs" xmlns:resources="clr-namespace:Bloxstrap.Resources" + xmlns:converters="clr-namespace:Bloxstrap.UI.Converters" mc:Ignorable="d" Title="{x:Static resources:Strings.Dialog_AddFastFlag_Title}" MinHeight="0" @@ -15,6 +16,10 @@ Background="{ui:ThemeResource ApplicationBackgroundBrush}" ExtendsContentIntoTitleBar="True" WindowStartupLocation="CenterScreen"> + + + + @@ -24,22 +29,43 @@ - - - - - - - - - + + + + + + + + + + + - - + + - - - + + + + + + + + + + + + + + + @@ -47,10 +73,22 @@ diff --git a/Bloxstrap/UI/Elements/Dialogs/AddFastFlagDialog.xaml.cs b/Bloxstrap/UI/Elements/Dialogs/AddFastFlagDialog.xaml.cs index efff5e4..42a850c 100644 --- a/Bloxstrap/UI/Elements/Dialogs/AddFastFlagDialog.xaml.cs +++ b/Bloxstrap/UI/Elements/Dialogs/AddFastFlagDialog.xaml.cs @@ -15,7 +15,7 @@ using System.Windows.Shapes; namespace Bloxstrap.UI.Elements.Dialogs { /// - /// Interaction logic for AddFlagDialog.xaml + /// Interaction logic for AddFastFlagDialog.xaml /// public partial class AddFastFlagDialog { diff --git a/Bloxstrap/UI/Elements/Dialogs/BulkAddFastFlagDialog.xaml b/Bloxstrap/UI/Elements/Dialogs/BulkAddFastFlagDialog.xaml deleted file mode 100644 index 55ae515..0000000 --- a/Bloxstrap/UI/Elements/Dialogs/BulkAddFastFlagDialog.xaml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -