I have a window where inside a tab widget's tab I have a checkbox that enables two different views in that tab - a table view and a combobox view (see screenshots below). Both show a list of files I have grabbed from a specific directory (WIP).
Combobox view:
Table view (shows only the stem of each file):
I use PyGame to manage my window including handling user input and the OpenGL context.
Note: While the issue that follows has been detected in Python, I do not believe that it does not affect the underlying C++ version.
Whenever the user scrolls with their mouse wheel, I use the value to zoom in and out of my scene. However, I obviously don't want this to happen, while the user is working with the combobox or the table (or any other scrollable widget).
I tried catching the hover event (imgui.is_item_hovered()) but it appears the event is triggered only when the mouse cursor is
- over the actual combobox and not the dropdown list of its items or the scrollbar on the side of those
- over the header of the table and not the cells
It seems I am missing some crucial piece of info about how hover works in ImGui. In the table above, for example, I have a column with a checkbox. Whenever my mouse is over one of those, I do get the hover event. So it appears that not all components of all widgets have this issue.
As a possible solution I also tried imgui.core.is_window_hovered() for my window. The problem here is that it doesn't work whenever hovering the table or the dropdown list. It appears that both are considered outside of the window, which doesn't make sense. I would have shown some understanding if e.g. the dropdown menu was spanning outside of the window box where the combobox widget is located (and this is indeed my case, since my paths are relatively long). But the table cells?
I am looking into using rectangles (each would represent a bounding box of the problematic widget) to detect if the mouse is inside. Especially for the dropdown list it would be very trick. I would prefer not to do such a customization for something that I would consider to be an essential part of a scrollable widget.

