TabItem: honor ImGuiTabItemFlags_NoCloseButton passed as parameter (although undocumented and part of private api) (#2923)

This commit is contained in:
omar
2019-12-07 16:22:07 +01:00
parent f656e7775e
commit e4a59d0025
3 changed files with 8 additions and 5 deletions

View File

@ -2027,7 +2027,7 @@ static void ShowDemoWindowLayout()
if (ImGui::BeginTabBar("MyTabBar", tab_bar_flags))
{
for (int n = 0; n < IM_ARRAYSIZE(opened); n++)
if (opened[n] && ImGui::BeginTabItem(names[n], &opened[n]))
if (opened[n] && ImGui::BeginTabItem(names[n], &opened[n], ImGuiTabItemFlags_None))
{
ImGui::Text("This is the %s tab!", names[n]);
if (n & 1)