Default window focus scope not 0. Added ImGuiSelectableFlags_SelectOnNav with comments and caveats. (#1861, #4242,)

Focus scope default value: amend 7ee623d9 a5041c88 2ebe08be
This commit is contained in:
ocornut
2021-06-21 17:37:37 +02:00
parent a15c42d5bd
commit f0c4d609a6
5 changed files with 21 additions and 8 deletions

View File

@ -6702,6 +6702,7 @@ static void ShowExampleAppLayout(bool* p_open)
ImGui::BeginChild("left pane", ImVec2(150, 0), true);
for (int i = 0; i < 100; i++)
{
// FIXME: Good candidate to use ImGuiSelectableFlags_SelectOnNav
char label[128];
sprintf(label, "MyObject %d", i);
if (ImGui::Selectable(label, selected == i))