mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat: add DALAMUD_NO_CONTEXTMENU env var
This commit is contained in:
parent
c4bc791d6f
commit
0d0496bee1
2 changed files with 9 additions and 1 deletions
|
|
@ -32,6 +32,11 @@ namespace Dalamud.Configuration.Internal
|
|||
/// </summary>
|
||||
public static bool DalamudWaitForDebugger { get; } = GetEnvironmentVariable("DALAMUD_WAIT_DEBUGGER");
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether or not Dalamud context menus should be disabled.
|
||||
/// </summary>
|
||||
public static bool DalamudNoContextMenu { get; } = GetEnvironmentVariable("DALAMUD_NO_CONTEXTMENU");
|
||||
|
||||
private static bool GetEnvironmentVariable(string name)
|
||||
=> bool.Parse(Environment.GetEnvironmentVariable(name) ?? "false");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using System;
|
|||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
using Dalamud.Configuration.Internal;
|
||||
using Dalamud.Game.Gui.ContextMenus;
|
||||
using Dalamud.Game.Gui.Dtr;
|
||||
using Dalamud.Game.Gui.FlyText;
|
||||
|
|
@ -426,6 +427,8 @@ namespace Dalamud.Game.Gui
|
|||
Service<ToastGui>.Get().Enable();
|
||||
Service<FlyTextGui>.Get().Enable();
|
||||
Service<PartyFinderGui>.Get().Enable();
|
||||
|
||||
if (!EnvironmentConfiguration.DalamudNoContextMenu)
|
||||
Service<ContextMenu>.Get().Enable();
|
||||
|
||||
this.setGlobalBgmHook.Enable();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue