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 1/3] 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; From 5f90fd905fe9b64eeb1fc7f8daf2bf7f2be6e1ca Mon Sep 17 00:00:00 2001 From: Aireil <33433913+Aireil@users.noreply.github.com> Date: Wed, 18 May 2022 18:49:33 +0200 Subject: [PATCH 2/3] fix: default language to EN instead of JA when manually injecting (#845) --- Dalamud/DalamudStartInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dalamud/DalamudStartInfo.cs b/Dalamud/DalamudStartInfo.cs index 767ee5000..1652bb817 100644 --- a/Dalamud/DalamudStartInfo.cs +++ b/Dalamud/DalamudStartInfo.cs @@ -39,7 +39,7 @@ namespace Dalamud /// /// Gets the language of the game client. /// - public ClientLanguage Language { get; init; } + public ClientLanguage Language { get; init; } = ClientLanguage.English; /// /// Gets the current game version code. From f84988baa68d28d0e1b5ad9953785aef4196c840 Mon Sep 17 00:00:00 2001 From: Cara Date: Fri, 20 May 2022 01:43:52 +0930 Subject: [PATCH 3/3] Add DalamudPluginInterface.IsDevMenuOpen (#848) * Add DalamudPluginInterface.IsDevMenuOpen * Update DalamudPluginInterface.cs Add another using because a namespaces changed every other week --- Dalamud/Plugin/DalamudPluginInterface.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dalamud/Plugin/DalamudPluginInterface.cs b/Dalamud/Plugin/DalamudPluginInterface.cs index 4e2ecc6c6..3f676cd82 100644 --- a/Dalamud/Plugin/DalamudPluginInterface.cs +++ b/Dalamud/Plugin/DalamudPluginInterface.cs @@ -15,6 +15,7 @@ using Dalamud.Game.Text.Sanitizer; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; using Dalamud.Interface; +using Dalamud.Interface.Internal; using Dalamud.Plugin.Internal; using Dalamud.Plugin.Ipc; using Dalamud.Plugin.Ipc.Exceptions; @@ -139,6 +140,11 @@ namespace Dalamud.Plugin /// /// Gets a value indicating whether Dalamud is running in Debug mode or the /xldev menu is open. This can occur on release builds. /// + public bool IsDevMenuOpen => Service.GetNullable() is {IsDevMenuOpen: true}; // Can be null during boot + + /// + /// Gets a value indicating whether a debugger is attached. + /// public bool IsDebugging => Debugger.IsAttached; ///