diff --git a/Pilz.Dalamud b/Pilz.Dalamud index ca638c1..0f6c3a5 160000 --- a/Pilz.Dalamud +++ b/Pilz.Dalamud @@ -1 +1 @@ -Subproject commit ca638c19a2a92c7d60f8b7c18062b293788225ce +Subproject commit 0f6c3a5332ee6ca9620bae06fa94342c7e671b20 diff --git a/PlayerTags/Configuration/PluginConfigurationUI.cs b/PlayerTags/Configuration/PluginConfigurationUI.cs index b5a034a..119fc58 100644 --- a/PlayerTags/Configuration/PluginConfigurationUI.cs +++ b/PlayerTags/Configuration/PluginConfigurationUI.cs @@ -3,7 +3,7 @@ using Dalamud.Game.Text; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Interface; using Dalamud.Interface.Utility; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Excel.Sheets; using Pilz.Dalamud.ActivityContexts; using Pilz.Dalamud.Icons; @@ -558,7 +558,7 @@ public class PluginConfigurationUI // Render the child nodes if (isOpened) { - ImGui.TreePush(); + ImGui.TreePush(tag.GetHashCode().ToString()); foreach (var childTag in tag.Children.OrderBy(child => GetTreeItemName(child)).ToArray()) { DrawTree(childTag); diff --git a/PlayerTags/PlayerTags.csproj b/PlayerTags/PlayerTags.csproj index da40a5e..eb69313 100644 --- a/PlayerTags/PlayerTags.csproj +++ b/PlayerTags/PlayerTags.csproj @@ -1,4 +1,4 @@ - + r00telement;Pilzinsel64 diff --git a/PlayerTags/UIColorHelper.cs b/PlayerTags/UIColorHelper.cs index 188cc54..6242bfa 100644 --- a/PlayerTags/UIColorHelper.cs +++ b/PlayerTags/UIColorHelper.cs @@ -1,4 +1,4 @@ -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Lumina.Excel; using Lumina.Excel.Sheets; using System; @@ -25,15 +25,7 @@ public static class UIColorHelper private static UIColor[] s_UIColors = null!; - public static IEnumerable UIColors - { - get - { - s_UIColors ??= CreateUIColors(); - - return s_UIColors; - } - } + public static IEnumerable UIColors => s_UIColors ??= CreateUIColors(); public static Vector4 ToColor(UIColor uiColor) { @@ -50,9 +42,7 @@ public static class UIColorHelper foreach (var uiColor in UIColors) { if ((ushort)uiColor.RowId == colorId) - { return ToColor(uiColor); - } } return new Vector4(); @@ -68,30 +58,30 @@ public static class UIColorHelper { var leftColor = ToColor(left); var rightColor = ToColor(right); - ImGui.ColorConvertRGBtoHSV(leftColor.X, leftColor.Y, leftColor.Z, out float leftHue, out float leftSaturation, out float leftValue); - ImGui.ColorConvertRGBtoHSV(rightColor.X, rightColor.Y, rightColor.Z, out float rightHue, out float rightSaturation, out float rightValue); + var leftHue = 0f; + var leftSaturation = 0f; + var leftValue = 0f; + var rightHue = 0f; + var rightSaturation = 0f; + var rightValue = 0f; + ImGui.ColorConvertRGBtoHSV(leftColor.X, leftColor.Y, leftColor.Z, ref leftHue, ref leftSaturation, ref leftValue); + ImGui.ColorConvertRGBtoHSV(rightColor.X, rightColor.Y, rightColor.Z, ref rightHue, ref rightSaturation, ref rightValue); var hueDifference = leftHue.CompareTo(rightHue); if (hueDifference != 0) - { return hueDifference; - } var valueDifference = leftValue.CompareTo(rightValue); if (valueDifference != 0) - { return valueDifference; - } var saturationDifference = leftSaturation.CompareTo(rightSaturation); if (saturationDifference != 0) - { return saturationDifference; - } return 0; }); - return filteredUIColors.ToArray(); + return [.. filteredUIColors]; } } diff --git a/PlayerTags/packages.lock.json b/PlayerTags/packages.lock.json index ccb023e..4c6b6f5 100644 --- a/PlayerTags/packages.lock.json +++ b/PlayerTags/packages.lock.json @@ -4,9 +4,9 @@ "net9.0-windows7.0": { "DalamudPackager": { "type": "Direct", - "requested": "[12.0.0, )", - "resolved": "12.0.0", - "contentHash": "J5TJLV3f16T/E2H2P17ClWjtfEBPpq3yxvqW46eN36JCm6wR+EaoaYkqG9Rm5sHqs3/nK/vKjWWyvEs/jhKoXw==" + "requested": "[13.0.0, )", + "resolved": "13.0.0", + "contentHash": "Mb3cUDSK/vDPQ8gQIeuCw03EMYrej1B4J44a1AvIJ9C759p9XeqdU9Hg4WgOmlnlPe0G7ILTD32PKSUpkQNa8w==" }, "DotNet.ReproducibleBuilds": { "type": "Direct",