diff --git a/SomethingNeedDoing/Interface/HelpWindow.cs b/SomethingNeedDoing/Interface/HelpWindow.cs index 881fbe89..e660e3f7 100644 --- a/SomethingNeedDoing/Interface/HelpWindow.cs +++ b/SomethingNeedDoing/Interface/HelpWindow.cs @@ -321,6 +321,10 @@ static void DisplayChangelog(string date, string changes, bool separator = true) ImGui.PushFont(UiBuilder.MonoFont); + DisplayChangelog( + "2024-01-04", + "- Added IsNodeVisible().\n"); + DisplayChangelog( "2023-12-22", "- Updated the GetRaw coordinate functions to take in an object name or party member position.\n"); @@ -922,6 +926,7 @@ bool HasStatus(string name) bool HasStatusId(uint id, ...) bool IsAddonVisible(string addonName) +bool IsNodeVisible(string addonName, int node) bool IsAddonReady(string addonName) // Can fetch nested nodes diff --git a/SomethingNeedDoing/Misc/CommandInterface.cs b/SomethingNeedDoing/Misc/CommandInterface.cs index 1f577aaa..901bbd28 100644 --- a/SomethingNeedDoing/Misc/CommandInterface.cs +++ b/SomethingNeedDoing/Misc/CommandInterface.cs @@ -352,6 +352,16 @@ public unsafe bool IsAddonVisible(string addonName) return addon->IsVisible; } + public unsafe bool IsNodeVisible(string addonName, int node) + { + var ptr = Service.GameGui.GetAddonByName(addonName, 1); + if (ptr == IntPtr.Zero) + return false; + + var addon = (AtkUnitBase*)ptr; + return addon->UldManager.NodeList[node]->IsVisible; + } + /// public unsafe bool IsAddonReady(string addonName) {