Skip to content
Open
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
35 changes: 35 additions & 0 deletions FFXIVClientStructs/FFXIV/Client/UI/AddonPointMenu.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using FFXIVClientStructs.FFXIV.Component.GUI;

namespace FFXIVClientStructs.FFXIV.Client.UI;

// Client::UI::AddonPointMenu
// Component::GUI::AtkUnitBase
// Component::GUI::AtkEventListener
[Addon("PointMenu")]
[GenerateInterop]
[Inherits<AtkUnitBase>]
[StructLayout(LayoutKind.Explicit, Size = 0x260)]
public unsafe partial struct AddonPointMenu {
[FieldOffset(0x238)] public StdVector<Pointer<Entry>> Entries;

[FieldOffset(0x250)] public TooltipContext* TooltipContextData;

[FieldOffset(0x258)] public int PendingFocusIndex; // Focus target index consumed in OnRefresh, then reset to -1

[StructLayout(LayoutKind.Explicit, Size = 0xA0)]
public struct Entry {
[FieldOffset(0x18)] public AtkComponentBase* Checkbox;
[FieldOffset(0x20)] public AtkResNode* TitleNode;
[FieldOffset(0x28)] public AtkResNode* ClickAreaNode;
[FieldOffset(0x30)] public Utf8String Title; // Entry title set by AgentPointMenu.SendEntryToAddon
[FieldOffset(0x98)] public byte IsActive; // Whether this entry is active (State > 0)
[FieldOffset(0x99)] public byte IsHovered; // Hover state flag, cleared each frame in Update
}

[StructLayout(LayoutKind.Explicit, Size = 0x20)]
public struct TooltipContext {
[FieldOffset(0x08)] public AtkResNode* RootNode;
[FieldOffset(0x10)] public AtkTextNode* TextNode;
[FieldOffset(0x18)] public AtkResNode* BackgroundNode;
}
}
55 changes: 55 additions & 0 deletions FFXIVClientStructs/FFXIV/Client/UI/Agent/AgentPointMenu.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using FFXIVClientStructs.FFXIV.Common.Component.Excel;

namespace FFXIVClientStructs.FFXIV.Client.UI.Agent;

// Client::UI::Agent::AgentPointMenu
// Client::UI::Agent::AgentInterface
// Component::GUI::AtkModuleInterface::AtkEventInterface
[Agent(AgentId.PointMenu)]
[GenerateInterop]
[Inherits<AgentInterface>]
[StructLayout(LayoutKind.Explicit, Size = 0x48)]
public unsafe partial struct AgentPointMenu {
[FieldOffset(0x28)] public PointMenuContext* Context;
[FieldOffset(0x30)] public StdMap<int, int>* CompletionData;
[FieldOffset(0x38)] public int Phase;
[FieldOffset(0x3C)] public int SelectedIndex;
[FieldOffset(0x40)] private uint unkInt40;
[FieldOffset(0x44)] private byte unkByte44;

// Allocates a PointMenuContext and loads Excel Sheet PointMenu (1181)
[MemberFunction("40 55 41 56 41 57 48 83 EC ?? 48 8B 01 45 8B F8")]
public partial PointMenuContext* CreateContext(uint eventType, int unk);

[MemberFunction("E8 ?? ?? ?? ?? FF C3 3B DE 72 F0")]
public partial void SendEntryToAddon(uint index);

[StructLayout(LayoutKind.Explicit, Size = 0x140)]
public struct PointMenuContext {
[FieldOffset(0x00)] public AgentPointMenu* Agent;
[FieldOffset(0x08)] private void* unk08;
[FieldOffset(0x10)] private void* unk10;
[FieldOffset(0x18)] public ExcelSheetWaiter SheetWaiter;
[FieldOffset(0xB8)] public Utf8String TitleText;
[FieldOffset(0x120)] public StdVector<PointMenuEntry> Entries;
[FieldOffset(0x138)] public uint EventType;
[FieldOffset(0x13C)] public bool IsLoaded;
}

[StructLayout(LayoutKind.Explicit, Size = 0x88)]
public struct PointMenuEntry {
[FieldOffset(0x00)] public float X;
[FieldOffset(0x04)] public float Y;
[FieldOffset(0x08)] public float ClickAreaX;
[FieldOffset(0x0C)] public float ClickAreaY;
[FieldOffset(0x10)] public float ClickAreaWidth;
[FieldOffset(0x14)] public float ClickAreaHeight;
[FieldOffset(0x1A)] public byte State;
[FieldOffset(0x1B)] public byte IsElliptical;
[FieldOffset(0x1C)] public byte NavUp;
[FieldOffset(0x1D)] public byte NavDown;
[FieldOffset(0x1E)] public byte NavLeft;
[FieldOffset(0x1F)] public byte NavRight;
[FieldOffset(0x20)] public Utf8String Text;
}
}
3 changes: 3 additions & 0 deletions ida/data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15043,6 +15043,8 @@ classes:
base: Client::UI::Agent::AgentInterface
funcs:
0x140A6AAE0: ctor
0x140A6ACF0: CreateContext
0x140A6B390: SendEntryToAddon
Client::UI::Agent::AgentTradeScreenImage:
vtbls:
- ea: 0x142199040
Expand Down Expand Up @@ -23148,6 +23150,7 @@ classes:
base: Component::GUI::AtkUnitBase
funcs:
0x1413F3B80: ctor
0x1413F5130: ShowTooltip
Client::UI::AddonTradeScreenImage: # 910
vtbls:
- ea: 0x142259CD0
Expand Down
Loading