Skip to content

Commit

Permalink
BeginPopupModal() default to NoCollapse for modal windows (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Jun 23, 2015
1 parent 06ed925 commit bcbf538
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3257,7 +3257,7 @@ bool ImGui::BeginPopupModal(const char* name, bool* p_opened, ImGuiWindowFlags e
return false;
}

ImGuiWindowFlags flags = extra_flags|ImGuiWindowFlags_Popup|ImGuiWindowFlags_Modal|ImGuiWindowFlags_NoSavedSettings;
ImGuiWindowFlags flags = extra_flags|ImGuiWindowFlags_Popup|ImGuiWindowFlags_Modal|ImGuiWindowFlags_NoCollapse|ImGuiWindowFlags_NoSavedSettings;
bool opened = ImGui::Begin(name, p_opened, ImVec2(0.0f, 0.0f), -1.0f, flags);
if (!opened || (p_opened && !*p_opened)) // Opened can be 'false' when the popup is completely clipped (e.g. zero size display)
{
Expand Down Expand Up @@ -11519,7 +11519,7 @@ void ImGui::ShowTestWindow(bool* opened)

if (ImGui::Button("Delete.."))
ImGui::OpenPopup("Delete?");
if (ImGui::BeginPopupModal("Delete?", NULL, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoCollapse))
if (ImGui::BeginPopupModal("Delete?", NULL, ImGuiWindowFlags_AlwaysAutoResize))
{
ImGui::Text("All those beautiful files will be deleted.\nThis operation cannot be undone!\n\n");
ImGui::Separator();
Expand Down

0 comments on commit bcbf538

Please sign in to comment.