diff options
Diffstat (limited to 'src/window.cpp')
| -rw-r--r-- | src/window.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/window.cpp b/src/window.cpp index f9b6ff2..e7d4506 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -2428,13 +2428,23 @@ void RecordCommandBuffer(VkCommandBuffer commandBuffer, uint32_t imageIndex) { vkCmdDraw(commandBuffer, 3, 1, 0, 0); // ImGui - if (pkePlugin.OnImGuiRender) { + const auto count = LoadedPkePlugins.Count(); + bool any = false; + for (long i = 0; i < count; ++i) { + if (LoadedPkePlugins[i].OnImGuiRender != nullptr) { + any = true; + break; + } + } + if (any) { ImGui_ImplVulkan_NewFrame(); ImGui_ImplGlfw_NewFrame(); ImGui::NewFrame(); - - pkePlugin.OnImGuiRender(); - + for (long i = 0; i < count; ++i) { + if (LoadedPkePlugins[i].OnImGuiRender != nullptr) { + LoadedPkePlugins[i].OnImGuiRender(); + } + } ImGui::Render(); auto drawData = ImGui::GetDrawData(); const bool isMinimized = drawData->DisplaySize.x <= 0.0f || drawData->DisplaySize.y <= 0.0f; |
