|
6 | 6 | using System.Runtime.InteropServices;
|
7 | 7 |
|
8 | 8 | using CheapLoc;
|
| 9 | + |
9 | 10 | using Dalamud.Game.ClientState.Keys;
|
10 | 11 | using Dalamud.Interface.Colors;
|
11 | 12 | using Dalamud.Interface.Components;
|
|
15 | 16 | using Dalamud.Logging.Internal;
|
16 | 17 |
|
17 | 18 | using FFXIVClientStructs.FFXIV.Client.UI;
|
| 19 | + |
18 | 20 | using ImGuiNET;
|
| 21 | + |
19 | 22 | using PInvoke;
|
20 | 23 |
|
21 | 24 | namespace Dalamud.Interface.Windowing;
|
@@ -429,7 +432,7 @@ internal void DrawInternal(WindowDrawFlags internalDrawFlags, WindowSystemPersis
|
429 | 432 | }
|
430 | 433 |
|
431 | 434 | ImGuiComponents.HelpMarker(
|
432 |
| - Loc.Localize("WindowSystemContextActionPinHint", "Pinned windows will not move or resize when you click and drag them.")); |
| 435 | + Loc.Localize("WindowSystemContextActionPinHint", "Pinned windows will not move or resize when you click and drag them, nor will they close when escape is pressed.")); |
433 | 436 | }
|
434 | 437 |
|
435 | 438 | if (this.internalIsClickthrough)
|
@@ -521,7 +524,7 @@ internal void DrawInternal(WindowDrawFlags internalDrawFlags, WindowSystemPersis
|
521 | 524 |
|
522 | 525 | this.IsFocused = ImGui.IsWindowFocused(ImGuiFocusedFlags.RootAndChildWindows);
|
523 | 526 |
|
524 |
| - if (internalDrawFlags.HasFlag(WindowDrawFlags.UseFocusManagement)) |
| 527 | + if (internalDrawFlags.HasFlag(WindowDrawFlags.UseFocusManagement) && !this.internalIsPinned) |
525 | 528 | {
|
526 | 529 | var escapeDown = Service<KeyState>.Get()[VirtualKey.ESCAPE];
|
527 | 530 | if (escapeDown && this.IsFocused && !wasEscPressedLastFrame && this.RespectCloseHotkey)
|
@@ -701,7 +704,7 @@ bool DrawButton(TitleBarButton button, Vector2 pos)
|
701 | 704 | drawList.AddCircleFilled(GetCenter(bb) + new Vector2(0.0f, -0.5f), (fontSize * 0.5f) + 1.0f, bgCol);
|
702 | 705 |
|
703 | 706 | var offset = button.IconOffset * ImGuiHelpers.GlobalScale;
|
704 |
| - drawList.AddText(InterfaceManager.IconFont, (float)(fontSize * 0.8), new Vector2(bb.X + offset.X, bb.Y + offset.Y), textCol, button.Icon.ToIconString()); |
| 707 | + drawList.AddText(InterfaceManager.IconFont, (float)(fontSize * 0.8), new Vector2(bb.X + offset.X, bb.Y + offset.Y), textCol, button.Icon.ToIconString()); |
705 | 708 |
|
706 | 709 | if (hovered)
|
707 | 710 | button.ShowTooltip?.Invoke();
|
|
0 commit comments