ImGUI : IsItemHovered in nested TreeNodes

Hey there,

I’m building some sort of file browser with ImGUI, using recursion. I need to know precisely which item is hovered, so I’m using the IsItemHovered node.

Thing is : if you have some deeply nested leaf and hover it, its parents are considered hovered as well. I have made a dummy repro patch with some indications : how can I get only the item I’m hovering to be considered “hovered”, and not its parents?

imgui_hover

Here’s the patch, if you want to inspect :

TreeHoverIssue.vl (23.5 KB)

Had a look at the ImGuiHoveredFlags but could not find anything that solves the issue. Maybe it’s an ImGUI thing and cannot be changed?

Thanks in advance!

seb

Thanks. Fixed for upcoming previews.