Clarified usage of ListBoxHeader() before we rename those functions + fixed demo code that didn't honor it correctly. (#1783)

This commit is contained in:
omar
2018-04-29 12:19:44 +02:00
parent f2e9dddeca
commit 429f48bb4f
2 changed files with 8 additions and 6 deletions

View File

@ -1299,10 +1299,12 @@ void ImGui::ShowDemoWindow(bool* p_open)
ImGui::Button("LEVERAGE\nBUZZWORD", size);
ImGui::SameLine();
ImGui::ListBoxHeader("List", size);
ImGui::Selectable("Selected", true);
ImGui::Selectable("Not Selected", false);
ImGui::ListBoxFooter();
if (ImGui::ListBoxHeader("List", size))
{
ImGui::Selectable("Selected", true);
ImGui::Selectable("Not Selected", false);
ImGui::ListBoxFooter();
}
ImGui::TreePop();
}