From bfe1ae025cea378f1d47bfb3ef87f71d60b16f5c Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Mon, 28 Aug 2023 07:27:32 -0400 Subject: ImGui enable docking and enable callbacks (input) --- CMakeLists.txt | 2 +- src/window.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c262fb..9db3251 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ set(PKE_SOURCE_FILES include(FetchContent) FetchContent_Declare( imguidocked - URL https://github.com/ocornut/imgui/archive/040e818d7215b648e216c25fa51c6093e273f651.zip + URL https://github.com/ocornut/imgui/archive/762ec445e63a95c1545b18b28d528f8ce38a9afd.zip ) FetchContent_GetProperties(imguidocked) diff --git a/src/window.cpp b/src/window.cpp index ec3ddf4..569ae54 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -877,6 +877,10 @@ void CreateSyncObjects() { void CreateImGui() { IMGUI_CHECKVERSION(); ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; ImGui::StyleColorsDark(); VkDescriptorPoolSize poolSizes[] = { @@ -902,11 +906,7 @@ void CreateImGui() { vkCreateDescriptorPool(vkDevice, &descriptorPoolCreateInfo, vkAllocator, &imGuiDescriptorPool); - ImGui_ImplGlfw_InitForVulkan(window, false); - /* - ImGui_ImplGlfw_InstallCallbacks(window); - */ - + ImGui_ImplGlfw_InitForVulkan(window, true); ImGui_ImplVulkan_InitInfo initInfo{}; initInfo.Allocator = vkAllocator; initInfo.CheckVkResultFn = ImGuiCheckVkResult; -- cgit v1.2.3