Highlight current player when viewing 'Locked items', but grouped by venture instead of character

This commit is contained in:
Liza 2024-01-07 18:54:00 +01:00
parent 31cbb118a4
commit a722f6a303
Signed by: liza
GPG Key ID: 7199F8D727D55F67
2 changed files with 19 additions and 2 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<Version>2.11</Version>
<Version>3.0</Version>
<LangVersion>11.0</LangVersion>
<Nullable>enable</Nullable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

View File

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