From aa940c54c2028bf60ce1bdd2f1a1269cee551a21 Mon Sep 17 00:00:00 2001 From: Anna Date: Mon, 22 Nov 2021 23:21:02 -0500 Subject: [PATCH] feat: add dye indicator to alternative finder --- Glamaholic/Ui/AlternativeFinder.cs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Glamaholic/Ui/AlternativeFinder.cs b/Glamaholic/Ui/AlternativeFinder.cs index 0c76537..9d59ab0 100755 --- a/Glamaholic/Ui/AlternativeFinder.cs +++ b/Glamaholic/Ui/AlternativeFinder.cs @@ -4,6 +4,7 @@ using System.Numerics; using Dalamud.Game.Text; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; +using Dalamud.Interface; using ImGuiNET; using Lumina.Excel.GeneratedSheets; @@ -72,13 +73,30 @@ namespace Glamaholic.Ui { } foreach (var alt in this.Alternatives) { - if (ImGui.Selectable($"{alt.Name}##{alt.RowId}", alt.RowId == this.Item.RowId)) { + if (ImGui.Selectable($"##{alt.RowId}", alt.RowId == this.Item.RowId)) { this.LinkItem(alt); } if (ImGui.IsItemClicked(ImGuiMouseButton.Right)) { this.Ui.Plugin.Functions.TryOn(alt.RowId, 0, false); } + + ImGui.SameLine(); + + ImGui.PushFont(UiBuilder.IconFont); + if (!alt.IsDyeable) { + ImGui.PushStyleColor(ImGuiCol.Text, ImGui.GetStyle().Colors[(int) ImGuiCol.TextDisabled]); + } + + ImGui.TextUnformatted(FontAwesomeIcon.FillDrip.ToIconString()); + if (!alt.IsDyeable) { + ImGui.PopStyleColor(); + } + + ImGui.PopFont(); + + ImGui.SameLine(); + ImGui.TextUnformatted(alt.Name); } ImGui.EndChild();