mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 06:13:40 +01:00
feat: add plugins & settings option to main menu bar system context
This commit is contained in:
parent
c2f5941435
commit
7b2f939003
3 changed files with 53 additions and 20 deletions
|
|
@ -11,7 +11,6 @@ using Dalamud.Memory;
|
|||
using FFXIVClientStructs.FFXIV.Client.UI;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
using Serilog;
|
||||
|
||||
using ValueType = FFXIVClientStructs.FFXIV.Component.GUI.ValueType;
|
||||
|
||||
|
|
@ -86,18 +85,6 @@ namespace Dalamud.Game.Gui.ContextMenus
|
|||
|
||||
private ContextMenuAddressResolver Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enable this subsystem.
|
||||
/// </summary>
|
||||
public void Enable()
|
||||
{
|
||||
this.contextMenuOpeningHook.Enable();
|
||||
this.contextMenuOpenedHook.Enable();
|
||||
this.contextMenuItemSelectedHook.Enable();
|
||||
this.subContextMenuOpeningHook.Enable();
|
||||
this.subContextMenuOpenedHook.Enable();
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
|
|
@ -108,6 +95,18 @@ namespace Dalamud.Game.Gui.ContextMenus
|
|||
this.contextMenuOpeningHook.Disable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable this subsystem.
|
||||
/// </summary>
|
||||
internal void Enable()
|
||||
{
|
||||
this.contextMenuOpeningHook.Enable();
|
||||
this.contextMenuOpenedHook.Enable();
|
||||
this.contextMenuItemSelectedHook.Enable();
|
||||
this.subContextMenuOpeningHook.Enable();
|
||||
this.subContextMenuOpenedHook.Enable();
|
||||
}
|
||||
|
||||
private static unsafe bool IsInventoryContext(AgentContextInterface* agentContextInterface)
|
||||
{
|
||||
return agentContextInterface == AgentInventoryContext.Instance();
|
||||
|
|
@ -129,8 +128,6 @@ namespace Dalamud.Game.Gui.ContextMenus
|
|||
|
||||
private unsafe bool ContextMenuOpenedDetour(AddonContextMenu* addonContextMenu, int atkValueCount, AtkValue* atkValues)
|
||||
{
|
||||
Log.Information("Poop " + Marshal.PtrToStringUTF8(new IntPtr(((AtkUnitBase*)addonContextMenu)->Name)));
|
||||
|
||||
try
|
||||
{
|
||||
this.ContextMenuOpenedImplementation(addonContextMenu, ref atkValueCount, ref atkValues);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue