Nav: moved RenderNavHighlight() calls of TreeNode and Selectable out of if (hovered || selected) tests. Should make no difference as NavId currently returns hovered. (#1861, #4242)

This commit is contained in:
ocornut
2021-06-21 16:58:38 +02:00
parent 98876b4dc2
commit a15c42d5bd
3 changed files with 4 additions and 4 deletions

View File

@ -1115,7 +1115,7 @@ static void ShowDemoWindowWidgets()
static bool selection[5] = { false, true, false, false, false };
ImGui::Selectable("1. I am selectable", &selection[0]);
ImGui::Selectable("2. I am selectable", &selection[1]);
ImGui::Text("3. I am not selectable");
ImGui::Text("(I am not selectable)");
ImGui::Selectable("4. I am selectable", &selection[3]);
if (ImGui::Selectable("5. I am double clickable", selection[4], ImGuiSelectableFlags_AllowDoubleClick))
if (ImGui::IsMouseDoubleClicked(0))