Updated ImGui.
This commit is contained in:
parent
05fa433681
commit
7b54707d8b
6
3rdparty/ocornut-imgui/imgui.cpp
vendored
6
3rdparty/ocornut-imgui/imgui.cpp
vendored
@ -4809,7 +4809,10 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||||||
// Window background
|
// Window background
|
||||||
ImU32 bg_col = GetColorU32(GetWindowBgColorIdxFromFlags(flags));
|
ImU32 bg_col = GetColorU32(GetWindowBgColorIdxFromFlags(flags));
|
||||||
if (g.NextWindowData.BgAlphaCond != 0)
|
if (g.NextWindowData.BgAlphaCond != 0)
|
||||||
|
{
|
||||||
bg_col = (bg_col & ~IM_COL32_A_MASK) | (IM_F32_TO_INT8_SAT(g.NextWindowData.BgAlphaVal) << IM_COL32_A_SHIFT);
|
bg_col = (bg_col & ~IM_COL32_A_MASK) | (IM_F32_TO_INT8_SAT(g.NextWindowData.BgAlphaVal) << IM_COL32_A_SHIFT);
|
||||||
|
g.NextWindowData.BgAlphaCond = 0;
|
||||||
|
}
|
||||||
window->DrawList->AddRectFilled(window->Pos+ImVec2(0,window->TitleBarHeight()), window->Pos+window->Size, bg_col, window_rounding, (flags & ImGuiWindowFlags_NoTitleBar) ? ImDrawCornerFlags_All : ImDrawCornerFlags_Bot);
|
window->DrawList->AddRectFilled(window->Pos+ImVec2(0,window->TitleBarHeight()), window->Pos+window->Size, bg_col, window_rounding, (flags & ImGuiWindowFlags_NoTitleBar) ? ImDrawCornerFlags_All : ImDrawCornerFlags_Bot);
|
||||||
|
|
||||||
// Title bar
|
// Title bar
|
||||||
@ -5018,7 +5021,8 @@ 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.
|
||||||
ImGui::SetNextWindowBgAlpha(bg_alpha_override);
|
if (bg_alpha_override >= 0.0f)
|
||||||
|
ImGui::SetNextWindowBgAlpha(bg_alpha_override);
|
||||||
|
|
||||||
return ImGui::Begin(name, p_open, flags);
|
return ImGui::Begin(name, p_open, flags);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user