From a87085e4c651b6d482a621cd06c8e92f03f61349 Mon Sep 17 00:00:00 2001 From: r00telement <47005506+r00telement@users.noreply.github.com> Date: Wed, 8 Dec 2021 20:14:30 +0000 Subject: [PATCH] Draw tree items with the tag text color --- PlayerTags/PluginConfigurationUI.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/PlayerTags/PluginConfigurationUI.cs b/PlayerTags/PluginConfigurationUI.cs index 75bab0f..8d310f1 100644 --- a/PlayerTags/PluginConfigurationUI.cs +++ b/PlayerTags/PluginConfigurationUI.cs @@ -247,7 +247,15 @@ namespace PlayerTags var beforeItemPos = ImGui.GetCursorScreenPos(); ImGui.PushStyleVar(ImGuiStyleVar.FramePadding, new Vector2(0, 3)); ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(0, 0)); + if (tag.TextColor.InheritedValue != null) + { + ImGui.PushStyleColor(ImGuiCol.Text, UIColorHelper.ToColor(tag.TextColor.InheritedValue.Value)); + } bool isOpened = ImGui.TreeNodeEx($"{GetTreeItemName(tag)}###{tag.GetHashCode()}", flags); + if (tag.TextColor.InheritedValue != null) + { + ImGui.PopStyleColor(); + } ImGui.PopStyleVar(); ImGui.PopStyleVar(); var afterItemPos = ImGui.GetCursorScreenPos();