From 4a2f890aa974dad97f9e37ad97593e2a3d85288d Mon Sep 17 00:00:00 2001 From: Soreepeong <3614868+Soreepeong@users.noreply.github.com> Date: Thu, 7 Aug 2025 07:52:46 +0900 Subject: [PATCH] Add ClearWindowFocus --- imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Widgets.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Widgets.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Widgets.cs index 7ff8bf272..9cbc3dc9a 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Widgets.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Widgets.cs @@ -564,8 +564,12 @@ public static unsafe partial class ImGui name.Dispose(); } + /// Sets the current window to be focused / top-most. + /// Prefer using . public static void SetWindowFocus() => ImGuiNative.SetWindowFocus(); + /// Sets a named window to be focused / top-most. + /// Name of the window to focus. Use default to remove focus. public static void SetWindowFocus(ImU8String name) { fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference()) @@ -573,6 +577,9 @@ public static unsafe partial class ImGui name.Dispose(); } + /// Removes focus from any window. + public static void ClearWindowFocus() => ImGuiNative.SetWindowFocus(null); + public static void SetWindowPos(Vector2 pos, ImGuiCond cond = ImGuiCond.None) => ImGuiNative.SetWindowPos(pos, cond);