Nav: Undo 87eb749cbc, agressively including nav focus test in IsItemHovered() (#323)

This commit is contained in:
ocornut
2016-08-21 15:26:40 +02:00
parent fddf9ca10e
commit 252f094101
3 changed files with 9 additions and 13 deletions

View File

@ -395,11 +395,10 @@ namespace ImGui
IMGUI_API void PopClipRect();
// Utilities
IMGUI_API bool IsItemHovered(); // is the last item hovered by mouse, and usable?
IMGUI_API bool IsItemHovered(); // is the last item hovered by mouse (and usable)? or we are currently using Nav and the item is focused.
IMGUI_API bool IsItemHoveredRect(); // is the last item hovered by mouse? even if another item is active or window is blocked by popup while we are hovering this
IMGUI_API bool IsItemActive(); // is the last item active? (e.g. button being held, text field being edited- items that don't interact will always return false)
IMGUI_API bool IsItemFocused(); // is the last item focused for keyboard/gamepad navigation?
IMGUI_API bool IsItemHoveredOrFocused(); // select best suitable between IsItemHovered() when mouse is used and IsItemFocused() when navigation is used. useful for tooltips that needs to work with both controls.
IMGUI_API bool IsItemClicked(int mouse_button = 0); // is the last item clicked? (e.g. button/node just clicked on)
IMGUI_API bool IsItemVisible(); // is the last item visible? (aka not out of sight due to clipping/scrolling.)
IMGUI_API bool IsAnyItemHovered();