From 90c27b53edc1807abebdd29b3890ea7fe526b5c6 Mon Sep 17 00:00:00 2001 From: r00telement <47005506+r00telement@users.noreply.github.com> Date: Wed, 8 Dec 2021 18:37:14 +0000 Subject: [PATCH] Added text glow option --- PlayerTags/Plugin.cs | 10 ++++++++++ PlayerTags/PluginConfigurationUI.cs | 3 +++ PlayerTags/Resources/Strings.Designer.cs | 20 +++++++++++++++++++- PlayerTags/Resources/Strings.resx | 6 ++++++ PlayerTags/Tag.cs | 1 + 5 files changed, 39 insertions(+), 1 deletion(-) diff --git a/PlayerTags/Plugin.cs b/PlayerTags/Plugin.cs index 1e7f017..08de897 100644 --- a/PlayerTags/Plugin.cs +++ b/PlayerTags/Plugin.cs @@ -322,8 +322,18 @@ namespace PlayerTags newPayloads.Add(new UIForegroundPayload(tag.TextColor.InheritedValue.Value)); } + if (tag.TextGlowColor.InheritedValue != null) + { + newPayloads.Add(new UIGlowPayload(tag.TextGlowColor.InheritedValue.Value)); + } + newPayloads.Add(new TextPayload(text)); + if (tag.TextGlowColor.InheritedValue != null) + { + newPayloads.Add(new UIGlowPayload(0)); + } + if (tag.TextColor.InheritedValue != null) { newPayloads.Add(new UIForegroundPayload(0)); diff --git a/PlayerTags/PluginConfigurationUI.cs b/PlayerTags/PluginConfigurationUI.cs index b4f4a41..fb0d1de 100644 --- a/PlayerTags/PluginConfigurationUI.cs +++ b/PlayerTags/PluginConfigurationUI.cs @@ -473,6 +473,9 @@ namespace PlayerTags case nameof(tag.TextColor): DrawInheritable(nameof(tag.TextColor), tag.TextColor); break; + case nameof(tag.TextGlowColor): + DrawInheritable(nameof(tag.TextGlowColor), tag.TextGlowColor); + break; case nameof(tag.IsTextItalic): DrawInheritable(nameof(tag.IsTextItalic), tag.IsTextItalic); break; diff --git a/PlayerTags/Resources/Strings.Designer.cs b/PlayerTags/Resources/Strings.Designer.cs index c17cdc8..a0b378c 100644 --- a/PlayerTags/Resources/Strings.Designer.cs +++ b/PlayerTags/Resources/Strings.Designer.cs @@ -592,7 +592,7 @@ namespace PlayerTags.Resources { } /// - /// Looks up a localized string similar to Add a new custom tag.. + /// Looks up a localized string similar to Add a custom tag.. /// public static string Loc_Static_AddCustomTag_Description { get { @@ -887,5 +887,23 @@ namespace PlayerTags.Resources { return ResourceManager.GetString("Loc_TextColor_Description", resourceCulture); } } + + /// + /// Looks up a localized string similar to Text color. + /// + public static string Loc_TextGlowColor { + get { + return ResourceManager.GetString("Loc_TextGlowColor", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The glow color of the text in the tag.. + /// + public static string Loc_TextGlowolor_Description { + get { + return ResourceManager.GetString("Loc_TextGlowolor_Description", resourceCulture); + } + } } } diff --git a/PlayerTags/Resources/Strings.resx b/PlayerTags/Resources/Strings.resx index 426f630..d5bcc6a 100644 --- a/PlayerTags/Resources/Strings.resx +++ b/PlayerTags/Resources/Strings.resx @@ -331,6 +331,12 @@ The color of the text in the tag. + + Text glow color + + + The glow color of the text in the tag. + Text italic diff --git a/PlayerTags/Tag.cs b/PlayerTags/Tag.cs index 2b1f445..b469384 100644 --- a/PlayerTags/Tag.cs +++ b/PlayerTags/Tag.cs @@ -88,6 +88,7 @@ namespace PlayerTags public InheritableReference Text = new InheritableReference(""); public InheritableValue TextColor = new InheritableValue(6); + public InheritableValue TextGlowColor = new InheritableValue(6); public InheritableValue IsTextItalic = new InheritableValue(false); public InheritableValue IsTextVisibleInChat = new InheritableValue(false); public InheritableValue IsTextVisibleInNameplates = new InheritableValue(false);