diff --git a/DearGenerator/TypeMaps/TypeMapEnumImGui.tt b/DearGenerator/TypeMaps/TypeMapEnumImGui.tt
index 7611da2..6da9622 100644
--- a/DearGenerator/TypeMaps/TypeMapEnumImGui.tt
+++ b/DearGenerator/TypeMaps/TypeMapEnumImGui.tt
@@ -35,7 +35,8 @@
"ImGuiTableRowFlags",
"ImGuiTreeNodeFlags",
"ImGuiViewportFlags",
- "ImGuiWindowFlags"
+ "ImGuiWindowFlags",
+ "ImGuiDockNodeFlags"
};
Generate(types, "Constants.ImGuiNamespace");
diff --git a/DearImGui/ImGui.g.cs b/DearImGui/ImGui.g.cs
index 4ef1625..92704ac 100644
--- a/DearImGui/ImGui.g.cs
+++ b/DearImGui/ImGui.g.cs
@@ -6325,7 +6325,7 @@ internal partial struct __Internal
internal ImGuiViewportFlags ViewportFlagsOverrideSet;
internal ImGuiViewportFlags ViewportFlagsOverrideClear;
internal ImGuiTabItemFlags TabItemFlagsOverrideSet;
- internal int DockNodeFlagsOverrideSet;
+ internal ImGuiDockNodeFlags DockNodeFlagsOverrideSet;
internal byte DockingAlwaysTabBar;
internal byte DockingAllowUnclassed;
}
@@ -6542,7 +6542,7 @@ public ImGuiTabItemFlags TabItemFlagsOverrideSet
}
/// [EXPERIMENTAL] Dock node flags to set when a window of this class is hosted by a dock node (it doesn't have to be selected!).
https://github.com/ocornut/imgui/blob/9cd9c2eff99877a3f10a7f9c2a3a5b9c15ea36c6/imgui.h#L2222.
- public int DockNodeFlagsOverrideSet
+ public ImGuiDockNodeFlags DockNodeFlagsOverrideSet
{
get
{
@@ -18756,10 +18756,10 @@ private partial struct __Internal32
internal static extern void SetTabItemClosed([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CppSharp.Runtime.UTF8Marshaller))] string tab_or_docked_window_label);
[SuppressUnmanagedCodeSecurity, DllImport("imgui", EntryPoint = "?DockSpace@ImGui@@YAIIABUImVec2@@HPBUImGuiWindowClass@@@Z", CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint DockSpace(uint id, IntPtr size, int flags, IntPtr window_class);
+ internal static extern uint DockSpace(uint id, IntPtr size, ImGuiDockNodeFlags flags, IntPtr window_class);
[SuppressUnmanagedCodeSecurity, DllImport("imgui", EntryPoint = "?DockSpaceOverViewport@ImGui@@YAIPBUImGuiViewport@@HPBUImGuiWindowClass@@@Z", CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint DockSpaceOverViewport(IntPtr viewport, int flags, IntPtr window_class);
+ internal static extern uint DockSpaceOverViewport(IntPtr viewport, ImGuiDockNodeFlags flags, IntPtr window_class);
[SuppressUnmanagedCodeSecurity, DllImport("imgui", EntryPoint = "?SetNextWindowDockID@ImGui@@YAXIH@Z", CallingConvention = CallingConvention.Cdecl)]
internal static extern void SetNextWindowDockID(uint dock_id, ImGuiCond cond);
@@ -20069,10 +20069,10 @@ private partial struct __Internal64
internal static extern void SetTabItemClosed([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CppSharp.Runtime.UTF8Marshaller))] string tab_or_docked_window_label);
[SuppressUnmanagedCodeSecurity, DllImport("imgui", EntryPoint = "?DockSpace@ImGui@@YAIIAEBUImVec2@@HPEBUImGuiWindowClass@@@Z", CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint DockSpace(uint id, IntPtr size, int flags, IntPtr window_class);
+ internal static extern uint DockSpace(uint id, IntPtr size, ImGuiDockNodeFlags flags, IntPtr window_class);
[SuppressUnmanagedCodeSecurity, DllImport("imgui", EntryPoint = "?DockSpaceOverViewport@ImGui@@YAIPEBUImGuiViewport@@HPEBUImGuiWindowClass@@@Z", CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint DockSpaceOverViewport(IntPtr viewport, int flags, IntPtr window_class);
+ internal static extern uint DockSpaceOverViewport(IntPtr viewport, ImGuiDockNodeFlags flags, IntPtr window_class);
[SuppressUnmanagedCodeSecurity, DllImport("imgui", EntryPoint = "?SetNextWindowDockID@ImGui@@YAXIH@Z", CallingConvention = CallingConvention.Cdecl)]
internal static extern void SetNextWindowDockID(uint dock_id, ImGuiCond cond);
@@ -24164,7 +24164,7 @@ public static void SetTabItemClosed(string tab_or_docked_window_label)
/// Docking.
[BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable.
Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking!
- Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking/undocking.
- Drag from window menu button (upper-left button) to undock an entire node (all windows).
- When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to _enable_ docking/undocking.
About dockspaces:.
- Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
- Use DockSpaceOverViewport() to create an explicit dock node covering the screen or a specific viewport.
This is often used with ImGuiDockNodeFlags_PassthruCentralNode.
- Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame!
- Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked.
E.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly.
https://github.com/ocornut/imgui/blob/9cd9c2eff99877a3f10a7f9c2a3a5b9c15ea36c6/imgui.h#L805.
// DEBUG: ImGuiID DockSpace(ImGuiID id, const ImVec2& size = ImVec2(0, 0), ImGuiDockNodeFlags flags = 0, const ImGuiWindowClass* window_class = NULL)
- public static uint DockSpace(uint id, Vector2 size, int flags = (int)(0), ImGuiWindowClass window_class = default)
+ public static uint DockSpace(uint id, Vector2 size, ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)(0), ImGuiWindowClass window_class = default)
{
var __arg1 = new IntPtr(Unsafe.AsPointer(ref size))
/* DEBUG: TypeMapImVec2.CSharpMarshalToNative: Case 3 */
@@ -24177,7 +24177,7 @@ public static uint DockSpace(uint id, Vector2 size, int flags = (int)(0), ImGuiW
/// https://github.com/ocornut/imgui/blob/9cd9c2eff99877a3f10a7f9c2a3a5b9c15ea36c6/imgui.h#L806.
// DEBUG: ImGuiID DockSpaceOverViewport(const ImGuiViewport* viewport = NULL, ImGuiDockNodeFlags flags = 0, const ImGuiWindowClass* window_class = NULL)
- public static uint DockSpaceOverViewport(ImGuiViewport viewport = default, int flags = (int)(0), ImGuiWindowClass window_class = default)
+ public static uint DockSpaceOverViewport(ImGuiViewport viewport = default, ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)(0), ImGuiWindowClass window_class = default)
{
var __arg0 = viewport is null ? IntPtr.Zero : viewport.__Instance;
var __arg2 = window_class is null ? IntPtr.Zero : window_class.__Instance;
diff --git a/SampleApplication.OpenTK/MyGameWindow.cs b/SampleApplication.OpenTK/MyGameWindow.cs
index 94ed077..2fa9210 100644
--- a/SampleApplication.OpenTK/MyGameWindow.cs
+++ b/SampleApplication.OpenTK/MyGameWindow.cs
@@ -72,7 +72,6 @@ protected override void OnRenderFrame(FrameEventArgs args)
if (ShowDockingDemo)
{
DrawDockSpaceOptionsBar(ref ShowDockingDemo);
- ImGui.DockSpaceOverViewport(ImGui.GetMainViewport(), (int)dockspace_flags);
}
@@ -131,6 +130,7 @@ protected override void OnResize(ResizeEventArgs e)
void DrawDockSpaceOptionsBar(ref bool p_open)
{
+ ImGui.DockSpaceOverViewport(ImGui.GetMainViewport(), dockspace_flags);
if (ImGui.BeginMainMenuBar())
{
if (ImGui.BeginMenu("Options"))