diff --git a/FFXIVClientStructs/FFXIV/Client/UI/AddonPointMenu.cs b/FFXIVClientStructs/FFXIV/Client/UI/AddonPointMenu.cs new file mode 100644 index 000000000..eac40b881 --- /dev/null +++ b/FFXIVClientStructs/FFXIV/Client/UI/AddonPointMenu.cs @@ -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] +[StructLayout(LayoutKind.Explicit, Size = 0x260)] +public unsafe partial struct AddonPointMenu { + [FieldOffset(0x238)] public StdVector> 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; + } +} diff --git a/FFXIVClientStructs/FFXIV/Client/UI/Agent/AgentPointMenu.cs b/FFXIVClientStructs/FFXIV/Client/UI/Agent/AgentPointMenu.cs new file mode 100644 index 000000000..83d538416 --- /dev/null +++ b/FFXIVClientStructs/FFXIV/Client/UI/Agent/AgentPointMenu.cs @@ -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] +[StructLayout(LayoutKind.Explicit, Size = 0x48)] +public unsafe partial struct AgentPointMenu { + [FieldOffset(0x28)] public PointMenuContext* Context; + [FieldOffset(0x30)] public StdMap* 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 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; + } +} diff --git a/ida/data.yml b/ida/data.yml index b6d531c87..8aeb458b2 100644 --- a/ida/data.yml +++ b/ida/data.yml @@ -15043,6 +15043,8 @@ classes: base: Client::UI::Agent::AgentInterface funcs: 0x140A6AAE0: ctor + 0x140A6ACF0: CreateContext + 0x140A6B390: SendEntryToAddon Client::UI::Agent::AgentTradeScreenImage: vtbls: - ea: 0x142199040 @@ -23148,6 +23150,7 @@ classes: base: Component::GUI::AtkUnitBase funcs: 0x1413F3B80: ctor + 0x1413F5130: ShowTooltip Client::UI::AddonTradeScreenImage: # 910 vtbls: - ea: 0x142259CD0