Multi-scene editing refactor

This commit is contained in:
antopilo
2025-01-26 20:21:04 -05:00
parent 387b82d385
commit c4e79c61ed
23 changed files with 3755 additions and 89 deletions
+10 -1
View File
@@ -423,7 +423,7 @@ void VkRenderer::InitImgui()
io.Fonts->AddFontFromMemoryTTF(StaticResources::Resources_Fonts_Poppins_Regular_ttf, StaticResources::Resources_Fonts_Poppins_Regular_ttf_len, 16.0);
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
//io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable;
io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable;
ImGui::StyleColorsDark();
ImGuiStyle& s = ImGui::GetStyle();
@@ -654,6 +654,15 @@ void VkRenderer::EndDraw()
VK_CALL(vkQueuePresentKHR(GPUQueue, &presentInfo));
auto& io = ImGui::GetIO();
//io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable;
//Update and Render additional Platform Windows
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
}
// Increase the number of frames drawn
FrameNumber++;
}
+12
View File
@@ -263,5 +263,17 @@ namespace Nuake
{
DrawButtonImage(image, image, image, tintNormal, tintHovered, tintPressed, ImGui::GetItemRectMin(), ImGui::GetItemRectMax());
};
bool Splitter(bool split_vertically, float thickness, float* size1, float* size2, float min_size1, float min_size2, float splitter_long_axis_size)
{
using namespace ImGui;
ImGuiContext& g = *GImGui;
ImGuiWindow* window = g.CurrentWindow;
ImGuiID id = window->GetID("##Splitter");
ImRect bb;
bb.Min = window->DC.CursorPos + (split_vertically ? ImVec2(*size1, 0.0f) : ImVec2(0.0f, *size1));
bb.Max = bb.Min + CalcItemSize(split_vertically ? ImVec2(thickness, splitter_long_axis_size) : ImVec2(splitter_long_axis_size, thickness), 0.0f, 0.0f);
return SplitterBehavior(bb, id, split_vertically ? ImGuiAxis_X : ImGuiAxis_Y, size1, size2, min_size1, min_size2, 0.0f);
}
}
}
+1
View File
@@ -79,5 +79,6 @@ namespace Nuake
ImRect RectOffset(const ImRect& rect, ImVec2 xy);
bool Splitter(bool split_vertically, float thickness, float* size1, float* size2, float min_size1, float min_size2, float splitter_long_axis_size = -1.0f);
}
}
+3 -3
View File
@@ -258,8 +258,8 @@ void Window::EndDraw()
if (ImGui::GetIO().ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
GLFWwindow* backup_current_context = glfwGetCurrentContext();
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
//ImGui::UpdatePlatformWindows();
//ImGui::RenderPlatformWindowsDefault();
glfwMakeContextCurrent(backup_current_context);
}
@@ -471,7 +471,7 @@ void Window::InitImgui()
io.Fonts->AddFontFromMemoryTTF(StaticResources::Resources_Fonts_Poppins_Regular_ttf, StaticResources::Resources_Fonts_Poppins_Regular_ttf_len, 16.0);
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
//io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable;
io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable;
ImGui::StyleColorsDark();
ImGuiStyle& s = ImGui::GetStyle();