Added text glow option

This commit is contained in:
r00telement
2021-12-08 18:37:14 +00:00
parent d510c375d7
commit 90c27b53ed
5 changed files with 39 additions and 1 deletions

View File

@@ -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));

View File

@@ -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;

View File

@@ -592,7 +592,7 @@ namespace PlayerTags.Resources {
}
/// <summary>
/// Looks up a localized string similar to Add a new custom tag..
/// Looks up a localized string similar to Add a custom tag..
/// </summary>
public static string Loc_Static_AddCustomTag_Description {
get {
@@ -887,5 +887,23 @@ namespace PlayerTags.Resources {
return ResourceManager.GetString("Loc_TextColor_Description", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Text color.
/// </summary>
public static string Loc_TextGlowColor {
get {
return ResourceManager.GetString("Loc_TextGlowColor", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The glow color of the text in the tag..
/// </summary>
public static string Loc_TextGlowolor_Description {
get {
return ResourceManager.GetString("Loc_TextGlowolor_Description", resourceCulture);
}
}
}
}

View File

@@ -331,6 +331,12 @@
<data name="Loc_TextColor_Description" xml:space="preserve">
<value>The color of the text in the tag.</value>
</data>
<data name="Loc_TextGlowColor" xml:space="preserve">
<value>Text glow color</value>
</data>
<data name="Loc_TextGlowColor_Description" xml:space="preserve">
<value>The glow color of the text in the tag.</value>
</data>
<data name="Loc_IsTextItalic" xml:space="preserve">
<value>Text italic</value>
</data>

View File

@@ -88,6 +88,7 @@ namespace PlayerTags
public InheritableReference<string> Text = new InheritableReference<string>("");
public InheritableValue<ushort> TextColor = new InheritableValue<ushort>(6);
public InheritableValue<ushort> TextGlowColor = new InheritableValue<ushort>(6);
public InheritableValue<bool> IsTextItalic = new InheritableValue<bool>(false);
public InheritableValue<bool> IsTextVisibleInChat = new InheritableValue<bool>(false);
public InheritableValue<bool> IsTextVisibleInNameplates = new InheritableValue<bool>(false);