How to detect user interaction in any part of ImGui? #7012

Closed
opened 2023-11-15 10:22:08 +00:00 by crazydef · 0 comments
crazydef commented 2023-11-15 10:22:08 +00:00 (Migrated from github.com)

Version: 1.89.4
Branch: master
Back-ends: Custom renderer
Compiler: VS2022
Operating System: Windows

My Issue/Question:

How can I tell if any ImGui window/component/control within the current context is being interacted with by the user?

I'm currently using this:

if( !ImGui::IsWindowHovered(ImGuiHoveredFlags_AnyWindow) && !ImGui::IsAnyItemActive() && !ImGui::IsAnyItemFocused())
{
   ...
}

but this test fails when the mouse is over any part of a window that has a combo box with an open menu.

Screenshots/Video
ImGuiBug.zip

Version: 1.89.4 Branch: master Back-ends: Custom renderer Compiler: VS2022 Operating System: Windows **My Issue/Question:** How can I tell if any ImGui window/component/control within the current context is being interacted with by the user? I'm currently using this: ``` if( !ImGui::IsWindowHovered(ImGuiHoveredFlags_AnyWindow) && !ImGui::IsAnyItemActive() && !ImGui::IsAnyItemFocused()) { ... } ``` but this test fails when the mouse is over any part of a window that has a combo box with an open menu. **Screenshots/Video** [ImGuiBug.zip](https://github.com/ocornut/imgui/files/13363219/ImGuiBug.zip)
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ocornut/imgui#7012
No description provided.