mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Modals, Popups: fixed an issue preventing to close a popup opened over a modal by clicking over void. (#7654)
This commit is contained in:
parent
219c6adc58
commit
0561d708ba
3 changed files with 9 additions and 2 deletions
|
|
@ -3875,7 +3875,7 @@ static void ShowDemoWindowPopups()
|
|||
static int item = 1;
|
||||
static float color[4] = { 0.4f, 0.7f, 0.0f, 0.5f };
|
||||
ImGui::Combo("Combo", &item, "aaaa\0bbbb\0cccc\0dddd\0eeee\0\0");
|
||||
ImGui::ColorEdit4("color", color);
|
||||
ImGui::ColorEdit4("Color", color);
|
||||
|
||||
if (ImGui::Button("Add another modal.."))
|
||||
ImGui::OpenPopup("Stacked 2");
|
||||
|
|
@ -3887,6 +3887,7 @@ static void ShowDemoWindowPopups()
|
|||
if (ImGui::BeginPopupModal("Stacked 2", &unused_open))
|
||||
{
|
||||
ImGui::Text("Hello from Stacked The Second!");
|
||||
ImGui::ColorEdit4("Color", color); // Allow opening another nested popup
|
||||
if (ImGui::Button("Close"))
|
||||
ImGui::CloseCurrentPopup();
|
||||
ImGui::EndPopup();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue