ItemAdd(), not performing computation for IsItemRectHovered() which does them itself, allowing us in the next commit to optimize ItemAdd() and make its logic more consistent with IsHovered().

This commit is contained in:
omar
2017-09-27 16:20:53 +02:00
parent e87ad328e4
commit 99c7622a1b
3 changed files with 11 additions and 11 deletions

View File

@ -1126,11 +1126,11 @@ void ImGui::ShowTestWindow(bool* p_open)
ImGui::Button("CCC");
ImGui::Button("DDD");
ImGui::EndGroup();
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Group hovered");
ImGui::SameLine();
ImGui::Button("EEE");
ImGui::EndGroup();
if (ImGui::IsItemHovered())
ImGui::SetTooltip("First group hovered");
}
// Capture the group size and create widgets using the same size
ImVec2 size = ImGui::GetItemRectSize();