mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Add ClearWindowFocus
This commit is contained in:
parent
12f099a57e
commit
4a2f890aa9
1 changed files with 7 additions and 0 deletions
|
|
@ -564,8 +564,12 @@ public static unsafe partial class ImGui
|
|||
name.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>Sets the current window to be focused / top-most.</summary>
|
||||
/// <remarks>Prefer using <see cref="SetNextWindowFocus"/>.</remarks>
|
||||
public static void SetWindowFocus() => ImGuiNative.SetWindowFocus();
|
||||
|
||||
/// <summary>Sets a named window to be focused / top-most.</summary>
|
||||
/// <param name="name">Name of the window to focus. Use <c>default</c> to remove focus.</param>
|
||||
public static void SetWindowFocus(ImU8String name)
|
||||
{
|
||||
fixed (byte* namePtr = &name.GetPinnableNullTerminatedReference())
|
||||
|
|
@ -573,6 +577,9 @@ public static unsafe partial class ImGui
|
|||
name.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>Removes focus from any window.</summary>
|
||||
public static void ClearWindowFocus() => ImGuiNative.SetWindowFocus(null);
|
||||
|
||||
public static void SetWindowPos(Vector2 pos, ImGuiCond cond = ImGuiCond.None) =>
|
||||
ImGuiNative.SetWindowPos(pos, cond);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue