mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-31 21:03:43 +01:00
feat: add IsFocusManagementEnabled to dalamud config
This commit is contained in:
parent
eb11857bac
commit
5d5f2354c1
4 changed files with 16 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
|||
using System.Numerics;
|
||||
|
||||
using Dalamud.Configuration.Internal;
|
||||
using Dalamud.Game.ClientState.Keys;
|
||||
using ImGuiNET;
|
||||
|
||||
|
|
@ -200,7 +200,8 @@ namespace Dalamud.Interface.Windowing
|
|||
this.IsFocused = ImGui.IsWindowFocused(ImGuiFocusedFlags.RootAndChildWindows);
|
||||
|
||||
var escapeDown = Service<KeyState>.Get()[VirtualKey.ESCAPE];
|
||||
if (escapeDown && this.IsFocused && !wasEscPressedLastFrame && this.RespectCloseHotkey)
|
||||
var isAllowed = Service<DalamudConfiguration>.Get().IsFocusManagementEnabled;
|
||||
if (escapeDown && this.IsFocused && isAllowed && !wasEscPressedLastFrame && this.RespectCloseHotkey)
|
||||
{
|
||||
this.IsOpen = false;
|
||||
wasEscPressedLastFrame = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue