Skip to content

Commit

Permalink
added isnodevisible
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaksuhn committed Jan 4, 2024
1 parent c2c4fef commit de614fc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions SomethingNeedDoing/Interface/HelpWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions SomethingNeedDoing/Misc/CommandInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/// <inheritdoc/>
public unsafe bool IsAddonReady(string addonName)
{
Expand Down

0 comments on commit de614fc

Please sign in to comment.