From b1fdfd798ca97eaf63174e56610d1c748f0ccdad Mon Sep 17 00:00:00 2001
From: goat <16760685+goaaats@users.noreply.github.com>
Date: Mon, 5 Apr 2021 17:17:52 +0200
Subject: [PATCH] feat: add ImGuiHelpers class, ForceMainWindow()
---
Dalamud/Interface/ImGuiHelpers.cs | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 Dalamud/Interface/ImGuiHelpers.cs
diff --git a/Dalamud/Interface/ImGuiHelpers.cs b/Dalamud/Interface/ImGuiHelpers.cs
new file mode 100644
index 000000000..90a400d52
--- /dev/null
+++ b/Dalamud/Interface/ImGuiHelpers.cs
@@ -0,0 +1,15 @@
+using ImGuiNET;
+
+namespace Dalamud.Interface
+{
+ ///
+ /// Class containing various helper methods for use with ImGui inside Dalamud.
+ ///
+ public static class ImGuiHelpers
+ {
+ ///
+ /// Force this ImGui window to stay inside the main game window.
+ ///
+ public static void ForceMainWindow() => ImGui.SetNextWindowViewport(ImGui.GetMainViewport().ID);
+ }
+}