-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API that returns true if a scrollbar is hovered? #8284
Comments
FYI you may also submit a You may also use
Well you are drawing into
This is a XY Problem at this point so it is not worth answering the "is scrollbar hovered" part of the question. Rather draw into the correct draw list. |
Hi @ocornut, I had actually tried GetWindowDrawList, but this doesn't actually resolve my issue, because if you have InputText fields, then the highlight does not apply over, but under. I will try the selectable suggestion instead of my approach to see if it produces the exact effect I want. Edit - I am thinking that I'm not using the draw lists correctly. I use the same highlighting technique in multiple applications and switching to GetWindowDrawList produces inconsistent results across codebases. For example in the picture here the buttons are underneath the highlight whereas the textinputs are not, but in another project most elements are on top. |
Also this helper would be useful to me, just wanted to mention: |
Within a same window, things are rendered in the order they are submitted. |
That makes sense, but in this case the highlight is the last thing that is being submitted. I am drawing stuff in a for loop: for (loop)
{
// draw a bunch of ImGui stuff
// The highlighting code from first post.
} |
If child windows are involved they are drawn above their parent. ah! Maybe it is related to draw call merging in the table api! |
Yeah I think that's the issue here |
Version/Branch of Dear ImGui:
Version 1.91.5, Branch: docking
Back-ends:
imgui_impl_opengl3.cpp + imgui_impl_glfw.cpp
Compiler, OS:
Windows 11 + MSVC 2022
Full config/build information:
No response
Details:
My Issue/Question:
Hi, I've implemented the following to highlight a table's rows if it is currently being hovered:
This works really well, except for the case where the OS layer window that holds the application is small, causing the horizontal scrollbar to be drawn. This produces the visual clash shown below:
The scrollbar is still interactible and functional, but obviously the visual effect is not nice.
I am looking for ideas on how to solve this problem. I was thinking that an API call that would return true if the scroll bar is hovered would solve my problem, but there might be another way to solve this already. Any suggestions are welcome.
The text was updated successfully, but these errors were encountered: