From a722f6a30366e0204b7fff1fbe585ef7af7ea293 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Sun, 7 Jan 2024 18:54:00 +0100 Subject: [PATCH] Highlight current player when viewing 'Locked items', but grouped by venture instead of character --- ARControl/ARControl.csproj | 2 +- ARControl/Windows/ConfigWindow.cs | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ARControl/ARControl.csproj b/ARControl/ARControl.csproj index 7991536..aae7b14 100644 --- a/ARControl/ARControl.csproj +++ b/ARControl/ARControl.csproj @@ -1,7 +1,7 @@ net7.0-windows - 2.11 + 3.0 11.0 enable true diff --git a/ARControl/Windows/ConfigWindow.cs b/ARControl/Windows/ConfigWindow.cs index 402cdfc..60dc13e 100644 --- a/ARControl/Windows/ConfigWindow.cs +++ b/ARControl/Windows/ConfigWindow.cs @@ -33,6 +33,7 @@ internal sealed class ConfigWindow : LImGui.LWindow { "Collect in order of the list", "Collect item with lowest inventory first" }; private static readonly Regex CountAndName = new(@"^(\d{1,5})x?\s+(.*)$", RegexOptions.Compiled); + private static readonly string CurrentCharPrefix = FontAwesomeIcon.Male.ToIconString(); private readonly DalamudPluginInterface _pluginInterface; private readonly Configuration _configuration; @@ -978,7 +979,23 @@ internal sealed class ConfigWindow : LImGui.LWindow { var color = ch.Items[item.ItemId]; if (color == ColorRed || (color == ColorGreen && !onlyShowMissing)) - ImGui.TextColored(color, ch.Character.ToString()); + { + bool currentCharacter = _clientState.LocalContentId == ch.Character.LocalContentId; + if (currentCharacter) + { + ImGui.PushFont(UiBuilder.IconFont); + float x = ImGui.GetCursorPosX(); + ImGui.SetCursorPosX(x - ImGui.CalcTextSize(CurrentCharPrefix).X - 5); + ImGui.TextUnformatted(CurrentCharPrefix); + ImGui.SetCursorPosX(x); + ImGui.SameLine(0, 5); + ImGui.PopFont(); + } + + ImGui.PushStyleColor(ImGuiCol.Text, color); + ImGui.TextUnformatted(ch.Character.ToString()); + ImGui.PopStyleColor(); + } } ImGui.Unindent(30);