1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-28 02:50:06 +00:00

Added IsAnyItemHovered() public helper.

This commit is contained in:
ocornut 2015-05-27 22:02:12 +01:00
parent 70f2ff0e5a
commit 8c4c421f74
2 changed files with 8 additions and 3 deletions

View file

@ -2984,10 +2984,14 @@ bool ImGui::IsItemActive()
return false;
}
bool ImGui::IsAnyItemHovered()
{
return GImGui->HoveredId != 0 || GImGui->HoveredIdPreviousFrame != 0;
}
bool ImGui::IsAnyItemActive()
{
ImGuiState& g = *GImGui;
return g.ActiveId != 0;
return GImGui->ActiveId != 0;
}
bool ImGui::IsItemVisible()