Fixed old Begin() calling SetNextWindowBgAlpha() with negative values. (#1567, #1568)

This commit is contained in:
omar 2018-01-24 17:39:21 +01:00
parent 37ee99983f
commit 5148937d4d

View File

@ -5018,6 +5018,7 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_first_use,
ImGui::SetNextWindowSize(size_first_use, ImGuiCond_FirstUseEver); ImGui::SetNextWindowSize(size_first_use, ImGuiCond_FirstUseEver);
// Old API feature: override the window background alpha with a parameter. // Old API feature: override the window background alpha with a parameter.
if (bg_alpha_override >= 0.0f)
ImGui::SetNextWindowBgAlpha(bg_alpha_override); ImGui::SetNextWindowBgAlpha(bg_alpha_override);
return ImGui::Begin(name, p_open, flags); return ImGui::Begin(name, p_open, flags);