From 125e089966213a2f6d2768312af40dcb9d08bf56 Mon Sep 17 00:00:00 2001 From: Aireil <33433913+Aireil@users.noreply.github.com> Date: Wed, 18 May 2022 18:49:19 +0200 Subject: [PATCH] feat: hide system menu buttons when using /xlui (#846) --- Dalamud/Game/Internal/DalamudAtkTweaks.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dalamud/Game/Internal/DalamudAtkTweaks.cs b/Dalamud/Game/Internal/DalamudAtkTweaks.cs index 111d1364c..0fede34c9 100644 --- a/Dalamud/Game/Internal/DalamudAtkTweaks.cs +++ b/Dalamud/Game/Internal/DalamudAtkTweaks.cs @@ -9,6 +9,7 @@ using Dalamud.Game.Text; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; using Dalamud.Hooking; +using Dalamud.Interface; using Dalamud.Interface.Internal; using Dalamud.Interface.Windowing; using FFXIVClientStructs.FFXIV.Component.GUI; @@ -90,8 +91,9 @@ namespace Dalamud.Game.Internal { var systemText = Service.Get().GetExcelSheet()!.GetRow(1059)!.Text.RawString; // "System" var configuration = Service.Get(); + var interfaceManager = Service.Get(); - if (args.Title == systemText && configuration.DoButtonsSystemMenu) + if (args.Title == systemText && configuration.DoButtonsSystemMenu && interfaceManager.IsDispatchingEvents) { var dalamudInterface = Service.Get(); @@ -131,8 +133,9 @@ namespace Dalamud.Game.Internal } var configuration = Service.Get(); + var interfaceManager = Service.Get(); - if (!configuration.DoButtonsSystemMenu) + if (!configuration.DoButtonsSystemMenu || !interfaceManager.IsDispatchingEvents) { this.hookAgentHudOpenSystemMenu.Original(thisPtr, atkValueArgs, menuSize); return;