Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DelvCD/Config/AboutPage.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Dalamud.Interface.Utility;
using DelvCD.Helpers;
using ImGuiNET;
using Dalamud.Bindings.ImGui;
using System.Numerics;

namespace DelvCD.Config
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Config/CharacterStateTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Config/ConfigColor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ImGuiNET;
using Dalamud.Bindings.ImGui;
using Newtonsoft.Json;
using System.Numerics;

Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Config/CooldownTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Config/ElementListConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Config/FontConfig.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Config/GroupConfig.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Config/ItemCooldownTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Config/JobGaugeTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Config/LabelListConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Config/StatusTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using Dalamud.Plugin.Services;
using DelvCD.Helpers;
using DelvCD.Helpers.DataSources;
using ImGuiNET;
using Dalamud.Bindings.ImGui;

namespace DelvCD.Config
{
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Config/Styles/BarStyleConfig.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Config/Styles/IconStyleConfig.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Config/Styles/LabelStyleConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Config/Styles/StyleConditions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Config/TriggerConfig.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Config/VisibilityConfig.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
8 changes: 4 additions & 4 deletions DelvCD/DelvCD.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
$(DalamudLibPath);
</AssemblySearchPaths>
</PropertyGroup>

<!-- Included Content -->
<ItemGroup>
<Content Include="DelvCD.json" CopyToOutputDirectory="Always" />
Expand All @@ -76,8 +76,8 @@
<HintPath>$(DalamudLibPath)Dalamud.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="ImGui.NET">
<HintPath>$(DalamudLibPath)ImGui.NET.dll</HintPath>
<Reference Include="Dalamud.Bindings.ImGui">
<HintPath>$(DalamudLibPath)Dalamud.Bindings.ImGui.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="ImGuiScene">
Expand All @@ -100,7 +100,7 @@

<!-- NuGet Packages -->
<ItemGroup>
<PackageReference Include="DalamudPackager" Version="12.0.0" />
<PackageReference Include="DalamudPackager" Version="13.0.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Config\Styles\" />
Expand Down
4 changes: 2 additions & 2 deletions DelvCD/Helpers/CharacterState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ public static unsafe bool ShouldBeVisible()
}

var gameGui = Singletons.Get<IGameGui>();
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;
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Helpers/ClipRectsHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Helpers/ConfigHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions DelvCD/Helpers/DrawHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Helpers/FontsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
22 changes: 11 additions & 11 deletions DelvCD/Helpers/KeybindHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<IClientState>().ClassJobChanged += OnJobChanged;
Expand Down Expand Up @@ -43,13 +43,13 @@ protected void Dispose(bool disposing)
Singletons.Get<IClientState>().ClassJobChanged -= OnJobChanged;
Instance = null!;
}

#endregion

private readonly Dictionary<uint, string> _keybindActionHints = new();
private readonly Dictionary<uint, string> _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)
Expand Down Expand Up @@ -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<IGameGui>();

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) {
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/PluginManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using DelvCD.Helpers;
using DelvCD.UIElements;
using DelvCD.Windows;
using ImGuiNET;
using Dalamud.Bindings.ImGui;

namespace DelvCD
{
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/UIElements/Bar.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/UIElements/Icon.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/UIElements/Label.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/UIElements/UIElement.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion DelvCD/Windows/ConfigWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions DelvCD/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -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=="
}
}
}
Expand Down
Loading