GUI: hide the dock space background

This commit is contained in:
tildearrow 2024-04-08 22:53:55 -05:00
parent c5a811f58e
commit b7e909d1d8
2 changed files with 7 additions and 4 deletions

View file

@ -16761,9 +16761,9 @@ static void ImGui::DockNodeUpdate(ImGuiDockNode* node)
if (host_window && node->IsEmpty() && node->IsVisible)
{
host_window->DrawList->ChannelsSetCurrent(DOCKING_HOST_DRAW_CHANNEL_BG);
node->LastBgColor = (node_flags & ImGuiDockNodeFlags_PassthruCentralNode) ? 0 : GetColorU32(ImGuiCol_DockingEmptyBg);
/*node->LastBgColor = (node_flags & ImGuiDockNodeFlags_PassthruCentralNode) ? 0 : GetColorU32(ImGuiCol_DockingEmptyBg);
if (node->LastBgColor != 0)
host_window->DrawList->AddRectFilled(node->Pos, node->Pos + node->Size, node->LastBgColor);
host_window->DrawList->AddRectFilled(node->Pos, node->Pos + node->Size, node->LastBgColor);*/
node->IsBgDrawnThisFrame = true;
}
@ -16774,10 +16774,11 @@ static void ImGui::DockNodeUpdate(ImGuiDockNode* node)
if (render_dockspace_bg && node->IsVisible)
{
host_window->DrawList->ChannelsSetCurrent(DOCKING_HOST_DRAW_CHANNEL_BG);
/*
if (central_node_hole)
RenderRectFilledWithHole(host_window->DrawList, node->Rect(), central_node->Rect(), GetColorU32(ImGuiCol_WindowBg), 0.0f);
else
host_window->DrawList->AddRectFilled(node->Pos, node->Pos + node->Size, GetColorU32(ImGuiCol_WindowBg), 0.0f);
host_window->DrawList->AddRectFilled(node->Pos, node->Pos + node->Size, GetColorU32(ImGuiCol_WindowBg), 0.0f);*/
}
// Draw and populate Tab Bar
@ -18124,7 +18125,7 @@ ImGuiID ImGui::DockSpaceOverViewport(const ImGuiViewport* viewport, ImGuiDockNod
ImGuiWindowFlags host_window_flags = 0;
host_window_flags |= ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDocking;
host_window_flags |= ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoNavFocus;
if (dockspace_flags & ImGuiDockNodeFlags_PassthruCentralNode)
//if (dockspace_flags & ImGuiDockNodeFlags_PassthruCentralNode)
host_window_flags |= ImGuiWindowFlags_NoBackground;
char label[32];

View file

@ -6305,6 +6305,8 @@ bool FurnaceGUI::loop() {
dl->AddText(markPos,0xffffffff,renderTime.c_str());
dl->AddText(markPos2,0xffffffff,renderTime2.c_str());
//logV("%s (%s)",renderTime,renderTime2);
}
layoutTimeEnd=SDL_GetPerformanceCounter();