Implicit "Debug" window hide itself based on cursor extend instead of the 'Accessed' flag.

docking
ocornut 10 years ago
parent d953f8d99a
commit 11025b3160

@ -2064,7 +2064,8 @@ void ImGui::Render()
{
// Hide implicit window if it hasn't been used
IM_ASSERT(g.CurrentWindowStack.size() == 1); // Mismatched Begin/End
if (g.CurrentWindow && !g.CurrentWindow->Accessed)
if (ImGuiWindow* window = g.CurrentWindow)
if (ImLengthSqr(window->DC.CursorMaxPos - window->DC.CursorStartPos) < 0.001f)
g.CurrentWindow->Visible = false;
ImGui::End();

Loading…
Cancel
Save