diff --git a/DelvCD/Config/AboutPage.cs b/DelvCD/Config/AboutPage.cs index c293b0b..08f2e54 100644 --- a/DelvCD/Config/AboutPage.cs +++ b/DelvCD/Config/AboutPage.cs @@ -1,6 +1,6 @@ using Dalamud.Interface.Utility; using DelvCD.Helpers; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using System.Numerics; namespace DelvCD.Config @@ -29,7 +29,7 @@ public void DrawConfig(IConfigurable parent, Vector2 size, float padX, float pad { ImDrawListPtr drawList = ImGui.GetWindowDrawList(); Vector2 pos = ImGui.GetWindowPos().AddX(size.X / 2 - iconSize.X / 2); - drawList.AddImage(Plugin.IconTexture.ImGuiHandle, pos, pos + iconSize); + drawList.AddImage(Plugin.IconTexture.Handle, pos, pos + iconSize); Vector2 textPos = ImGui.GetWindowPos().AddX(size.X / 2 - textSize.X / 2).AddY(iconSize.Y); drawList.AddText(textPos, 0xFFFFFFFF, versionText); ImGui.End(); diff --git a/DelvCD/Config/CharacterStateTrigger.cs b/DelvCD/Config/CharacterStateTrigger.cs index d796331..a9e5cdd 100644 --- a/DelvCD/Config/CharacterStateTrigger.cs +++ b/DelvCD/Config/CharacterStateTrigger.cs @@ -8,7 +8,7 @@ using Dalamud.Plugin.Services; using DelvCD.Helpers; using DelvCD.Helpers.DataSources; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using CharacterStruct = FFXIVClientStructs.FFXIV.Client.Game.Character.Character; diff --git a/DelvCD/Config/ConfigColor.cs b/DelvCD/Config/ConfigColor.cs index ba49557..d5bf6f6 100644 --- a/DelvCD/Config/ConfigColor.cs +++ b/DelvCD/Config/ConfigColor.cs @@ -1,4 +1,4 @@ -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; using System.Numerics; diff --git a/DelvCD/Config/CooldownTrigger.cs b/DelvCD/Config/CooldownTrigger.cs index 4ad8261..9d68251 100644 --- a/DelvCD/Config/CooldownTrigger.cs +++ b/DelvCD/Config/CooldownTrigger.cs @@ -3,7 +3,7 @@ using Dalamud.Plugin.Services; using DelvCD.Helpers; using DelvCD.Helpers.DataSources; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using System; using System.Linq; using System.Numerics; diff --git a/DelvCD/Config/ElementListConfig.cs b/DelvCD/Config/ElementListConfig.cs index bdd26f0..ff2eb99 100644 --- a/DelvCD/Config/ElementListConfig.cs +++ b/DelvCD/Config/ElementListConfig.cs @@ -7,7 +7,7 @@ using Dalamud.Interface.Utility; using DelvCD.Helpers; using DelvCD.UIElements; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; namespace DelvCD.Config diff --git a/DelvCD/Config/FontConfig.cs b/DelvCD/Config/FontConfig.cs index a734fea..e106715 100644 --- a/DelvCD/Config/FontConfig.cs +++ b/DelvCD/Config/FontConfig.cs @@ -1,7 +1,7 @@ using Dalamud.Interface; using Dalamud.Interface.Utility; using DelvCD.Helpers; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; using System; using System.Collections.Generic; diff --git a/DelvCD/Config/GroupConfig.cs b/DelvCD/Config/GroupConfig.cs index 906a503..1bfd95e 100644 --- a/DelvCD/Config/GroupConfig.cs +++ b/DelvCD/Config/GroupConfig.cs @@ -1,7 +1,7 @@ using Dalamud.Interface.Utility; using DelvCD.UIElements; using DelvCD.Helpers; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; using System.Numerics; using System.Collections.Generic; diff --git a/DelvCD/Config/ItemCooldownTrigger.cs b/DelvCD/Config/ItemCooldownTrigger.cs index 6367a57..b703ca7 100644 --- a/DelvCD/Config/ItemCooldownTrigger.cs +++ b/DelvCD/Config/ItemCooldownTrigger.cs @@ -7,7 +7,7 @@ using DelvCD.Helpers; using DelvCD.Helpers.DataSources; using FFXIVClientStructs.FFXIV.Client.Game; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace DelvCD.Config { diff --git a/DelvCD/Config/JobGaugeTrigger.cs b/DelvCD/Config/JobGaugeTrigger.cs index 2cd71f9..c6db489 100644 --- a/DelvCD/Config/JobGaugeTrigger.cs +++ b/DelvCD/Config/JobGaugeTrigger.cs @@ -8,7 +8,7 @@ using DelvCD.Config.JobGauges; using DelvCD.Helpers; using DelvCD.Helpers.DataSources; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; namespace DelvCD.Config diff --git a/DelvCD/Config/LabelListConfig.cs b/DelvCD/Config/LabelListConfig.cs index 03c78a1..3c4b221 100644 --- a/DelvCD/Config/LabelListConfig.cs +++ b/DelvCD/Config/LabelListConfig.cs @@ -5,7 +5,7 @@ using Dalamud.Interface.Utility; using DelvCD.Helpers; using DelvCD.UIElements; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; namespace DelvCD.Config diff --git a/DelvCD/Config/StatusTrigger.cs b/DelvCD/Config/StatusTrigger.cs index 2f37654..e9add66 100644 --- a/DelvCD/Config/StatusTrigger.cs +++ b/DelvCD/Config/StatusTrigger.cs @@ -12,7 +12,7 @@ using Dalamud.Plugin.Services; using DelvCD.Helpers; using DelvCD.Helpers.DataSources; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace DelvCD.Config { diff --git a/DelvCD/Config/Styles/BarStyleConfig.cs b/DelvCD/Config/Styles/BarStyleConfig.cs index 0b1f4a7..f40178d 100644 --- a/DelvCD/Config/Styles/BarStyleConfig.cs +++ b/DelvCD/Config/Styles/BarStyleConfig.cs @@ -1,7 +1,7 @@ using Dalamud.Interface.Utility; using DelvCD.Helpers; using DelvCD.Helpers.DataSources; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; using System; using System.Collections.Generic; diff --git a/DelvCD/Config/Styles/IconStyleConfig.cs b/DelvCD/Config/Styles/IconStyleConfig.cs index 678b427..e46afc9 100644 --- a/DelvCD/Config/Styles/IconStyleConfig.cs +++ b/DelvCD/Config/Styles/IconStyleConfig.cs @@ -1,7 +1,7 @@ using Dalamud.Interface.Utility; using DelvCD.Helpers; using DelvCD.Helpers.DataSources; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; using System; using System.Collections.Generic; diff --git a/DelvCD/Config/Styles/LabelStyleConfig.cs b/DelvCD/Config/Styles/LabelStyleConfig.cs index 9462eee..474d690 100644 --- a/DelvCD/Config/Styles/LabelStyleConfig.cs +++ b/DelvCD/Config/Styles/LabelStyleConfig.cs @@ -2,7 +2,7 @@ using Dalamud.Interface.Utility; using DelvCD.Helpers; using DelvCD.UIElements; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; using System; using System.Collections.Generic; diff --git a/DelvCD/Config/Styles/StyleConditions.cs b/DelvCD/Config/Styles/StyleConditions.cs index 95a68f3..753b362 100644 --- a/DelvCD/Config/Styles/StyleConditions.cs +++ b/DelvCD/Config/Styles/StyleConditions.cs @@ -2,7 +2,7 @@ using Dalamud.Interface.Utility; using DelvCD.Helpers; using DelvCD.Helpers.DataSources; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; using System; using System.Collections.Generic; diff --git a/DelvCD/Config/TriggerConfig.cs b/DelvCD/Config/TriggerConfig.cs index 5a06787..cd3510a 100644 --- a/DelvCD/Config/TriggerConfig.cs +++ b/DelvCD/Config/TriggerConfig.cs @@ -1,7 +1,7 @@ using Dalamud.Interface; using Dalamud.Interface.Utility; using DelvCD.Helpers; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; using System; using System.Collections.Generic; diff --git a/DelvCD/Config/VisibilityConfig.cs b/DelvCD/Config/VisibilityConfig.cs index 7fa78bf..6629038 100644 --- a/DelvCD/Config/VisibilityConfig.cs +++ b/DelvCD/Config/VisibilityConfig.cs @@ -1,6 +1,6 @@ using Dalamud.Interface.Utility; using DelvCD.Helpers; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; using System; using System.Collections.Generic; diff --git a/DelvCD/DelvCD.csproj b/DelvCD/DelvCD.csproj index 1881810..7da0c71 100644 --- a/DelvCD/DelvCD.csproj +++ b/DelvCD/DelvCD.csproj @@ -54,7 +54,7 @@ $(DalamudLibPath); - + @@ -76,8 +76,8 @@ $(DalamudLibPath)Dalamud.dll false - - $(DalamudLibPath)ImGui.NET.dll + + $(DalamudLibPath)Dalamud.Bindings.ImGui.dll false @@ -100,7 +100,7 @@ - + diff --git a/DelvCD/Helpers/CharacterState.cs b/DelvCD/Helpers/CharacterState.cs index 0cfa859..726d41b 100644 --- a/DelvCD/Helpers/CharacterState.cs +++ b/DelvCD/Helpers/CharacterState.cs @@ -89,8 +89,8 @@ public static unsafe bool ShouldBeVisible() } var gameGui = Singletons.Get(); - var parameterWidget = (AtkUnitBase*)gameGui.GetAddonByName("_ParameterWidget", 1); - var fadeMiddleWidget = (AtkUnitBase*)gameGui.GetAddonByName("FadeMiddle", 1); + var parameterWidget = (AtkUnitBase*)gameGui.GetAddonByName("_ParameterWidget", 1).Address; + var fadeMiddleWidget = (AtkUnitBase*)gameGui.GetAddonByName("FadeMiddle", 1).Address; var paramenterVisible = parameterWidget != null && parameterWidget->IsVisible; var fadeMiddleVisible = fadeMiddleWidget != null && fadeMiddleWidget->IsVisible; return paramenterVisible && !fadeMiddleVisible; diff --git a/DelvCD/Helpers/ClipRectsHelper.cs b/DelvCD/Helpers/ClipRectsHelper.cs index d25a4d6..cbbe754 100644 --- a/DelvCD/Helpers/ClipRectsHelper.cs +++ b/DelvCD/Helpers/ClipRectsHelper.cs @@ -4,7 +4,7 @@ using System.Runtime.CompilerServices; using FFXIVClientStructs.FFXIV.Client.UI; using FFXIVClientStructs.FFXIV.Component.GUI; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace DelvCD.Helpers { diff --git a/DelvCD/Helpers/ConfigHelpers.cs b/DelvCD/Helpers/ConfigHelpers.cs index 704eace..da18e62 100644 --- a/DelvCD/Helpers/ConfigHelpers.cs +++ b/DelvCD/Helpers/ConfigHelpers.cs @@ -3,7 +3,7 @@ using DelvCD.Config; using DelvCD.Helpers.DataSources; using DelvCD.UIElements; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using System; diff --git a/DelvCD/Helpers/DrawHelpers.cs b/DelvCD/Helpers/DrawHelpers.cs index b5c0081..0cedb0d 100644 --- a/DelvCD/Helpers/DrawHelpers.cs +++ b/DelvCD/Helpers/DrawHelpers.cs @@ -5,7 +5,7 @@ using Dalamud.Interface.Textures.TextureWraps; using Dalamud.Plugin.Services; using DelvCD.Config; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace DelvCD.Helpers { @@ -95,7 +95,7 @@ public static void DrawIcon( (Vector2 uv0, Vector2 uv1) = GetTexCoordinates(tex, size, cropIcon); uint alpha = (uint)(opacity * 255) << 24 | 0x00FFFFFF; - drawList.AddImage(tex.ImGuiHandle, position, position + size, uv0, uv1, alpha); + drawList.AddImage(tex.Handle, position, position + size, uv0, uv1, alpha); } public static (Vector2, Vector2) GetTexCoordinates(IDalamudTextureWrap texture, Vector2 size, bool cropIcon = true) diff --git a/DelvCD/Helpers/FontsManager.cs b/DelvCD/Helpers/FontsManager.cs index 9522858..1b682a9 100644 --- a/DelvCD/Helpers/FontsManager.cs +++ b/DelvCD/Helpers/FontsManager.cs @@ -7,7 +7,7 @@ using Dalamud.Interface.ManagedFontAtlas; using Dalamud.Interface.Utility; using Dalamud.Plugin.Services; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace DelvCD.Helpers { diff --git a/DelvCD/Helpers/KeybindHelper.cs b/DelvCD/Helpers/KeybindHelper.cs index a507c18..3691add 100644 --- a/DelvCD/Helpers/KeybindHelper.cs +++ b/DelvCD/Helpers/KeybindHelper.cs @@ -13,9 +13,9 @@ namespace DelvCD.Helpers; public unsafe class KeybindHelper { // Referenced https://github.com/Caraxi/SimpleTweaksPlugin/blob/main/Tweaks/UiAdjustment/ControlHintMirroring.cs for a lot of this code. - + #region Singleton - + public KeybindHelper() { Singletons.Get().ClassJobChanged += OnJobChanged; @@ -43,13 +43,13 @@ protected void Dispose(bool disposing) Singletons.Get().ClassJobChanged -= OnJobChanged; Instance = null!; } - + #endregion - + private readonly Dictionary _keybindActionHints = new(); private readonly Dictionary _keybindItemHints = new(); private readonly string?[] _actionBars = ["_ActionBar09", "_ActionBar", "_ActionBar01", "_ActionBar02", "_ActionBar03", "_ActionBar04", "_ActionBar05", "_ActionBar06", "_ActionBar07", "_ActionBar08"]; - + private void ActionBarUpdateRequested(AddonActionBarX* addon) { byte barId = addon->AddonActionBarBase.RaptureHotbarId; if (barId == 9) @@ -77,20 +77,20 @@ private void ActionBarUpdateRequested(AddonActionBarX* addon) { _keybindItemHints[itemId] = str; continue; } - + uint actionId = ActionManager.Instance()->GetAdjustedActionId(slot->CommandId); _keybindActionHints[actionId] = str; } } - + public void UpdateKeybindHints() { IGameGui gameGui = Singletons.Get(); foreach (string? addonName in _actionBars) { string? nameToUse = addonName; - AddonActionBarX* addon = !string.IsNullOrEmpty(nameToUse) - ? (AddonActionBarX*)gameGui.GetAddonByName(nameToUse, 1) + AddonActionBarX* addon = !string.IsNullOrEmpty(nameToUse) + ? (AddonActionBarX*)gameGui.GetAddonByName(nameToUse, 1).Address : null; if (addon != null) { @@ -121,13 +121,13 @@ public string GetKeybindHintFormatted(uint id, KeybindType type) keybindHint = keybindHint.Replace("º", "n"); // Numpad return keybindHint; } - + private void OnJobChanged(uint _) { // Update the action bar when the job changes UpdateKeybindHints(); } - + public uint StripFirstTwoDigits(uint number) { string numberStr = number.ToString(); diff --git a/DelvCD/PluginManager.cs b/DelvCD/PluginManager.cs index 683d942..552f43f 100644 --- a/DelvCD/PluginManager.cs +++ b/DelvCD/PluginManager.cs @@ -9,7 +9,7 @@ using DelvCD.Helpers; using DelvCD.UIElements; using DelvCD.Windows; -using ImGuiNET; +using Dalamud.Bindings.ImGui; namespace DelvCD { diff --git a/DelvCD/UIElements/Bar.cs b/DelvCD/UIElements/Bar.cs index dff3b14..aa320da 100644 --- a/DelvCD/UIElements/Bar.cs +++ b/DelvCD/UIElements/Bar.cs @@ -1,7 +1,7 @@ using DelvCD.Config; using DelvCD.Helpers; using DelvCD.Helpers.DataSources; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using System; using System.Collections.Generic; using System.Linq; diff --git a/DelvCD/UIElements/Icon.cs b/DelvCD/UIElements/Icon.cs index 3a2ad22..674cbf1 100644 --- a/DelvCD/UIElements/Icon.cs +++ b/DelvCD/UIElements/Icon.cs @@ -1,7 +1,7 @@ using DelvCD.Config; using DelvCD.Helpers; using DelvCD.Helpers.DataSources; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using System; using System.Collections.Generic; using System.Linq; diff --git a/DelvCD/UIElements/Label.cs b/DelvCD/UIElements/Label.cs index aaa6d0b..a27c768 100644 --- a/DelvCD/UIElements/Label.cs +++ b/DelvCD/UIElements/Label.cs @@ -1,7 +1,7 @@ using DelvCD.Config; using DelvCD.Helpers; using DelvCD.Helpers.DataSources; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; using System.Collections.Generic; using System.Linq; diff --git a/DelvCD/UIElements/UIElement.cs b/DelvCD/UIElements/UIElement.cs index 1ed7727..99ba0fa 100644 --- a/DelvCD/UIElements/UIElement.cs +++ b/DelvCD/UIElements/UIElement.cs @@ -1,7 +1,7 @@ using DelvCD.Config; using DelvCD.Helpers; using DelvCD.Helpers.DataSources; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using Newtonsoft.Json; using System; using System.Collections.Generic; diff --git a/DelvCD/Windows/ConfigWindow.cs b/DelvCD/Windows/ConfigWindow.cs index 96f5bee..2245872 100644 --- a/DelvCD/Windows/ConfigWindow.cs +++ b/DelvCD/Windows/ConfigWindow.cs @@ -4,7 +4,7 @@ using DelvCD.Config; using DelvCD.Helpers; using DelvCD.UIElements; -using ImGuiNET; +using Dalamud.Bindings.ImGui; using System.Collections.Generic; using System.Linq; using System.Numerics; diff --git a/DelvCD/packages.lock.json b/DelvCD/packages.lock.json index a88a53c..a8da654 100644 --- a/DelvCD/packages.lock.json +++ b/DelvCD/packages.lock.json @@ -4,9 +4,9 @@ "net9.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==" } } }