diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2023-08-28 07:27:32 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2023-08-28 07:27:32 -0400 |
| commit | bfe1ae025cea378f1d47bfb3ef87f71d60b16f5c (patch) | |
| tree | a85b0fb06154ece97a26bf84b2f12cf2bfec1232 | |
| parent | b29fb48ac8d99a44e4bd63de262a66b1959893b9 (diff) | |
ImGui enable docking and enable callbacks (input)
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | 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; |
