1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-28 17:40:56 +01:00

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

This commit is contained in:
ocornut 2015-03-19 15:01:07 +00:00
parent d953f8d99a
commit 11025b3160

View File

@ -2064,8 +2064,9 @@ 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)
g.CurrentWindow->Visible = false;
if (ImGuiWindow* window = g.CurrentWindow)
if (ImLengthSqr(window->DC.CursorMaxPos - window->DC.CursorStartPos) < 0.001f)
g.CurrentWindow->Visible = false;
ImGui::End();
// Select window for move/focus when we're done with all our widgets (we use the root window ID here)