mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-24 15:50:25 +01:00
Popup: clicking on empty space also close popup #126
This commit is contained in:
parent
ac2da570f5
commit
5fe4ae62cb
@ -3309,7 +3309,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
|
||||
}
|
||||
if (window->Flags & ImGuiWindowFlags_Popup)
|
||||
{
|
||||
if (g.FocusedWindow != window)
|
||||
if ((g.IO.MouseClicked[0] && (!g.HoveredWindow || g.HoveredWindow->RootWindow != window)) || (!g.FocusedWindow || g.FocusedWindow->RootWindow != window))
|
||||
if (p_opened)
|
||||
*p_opened = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user