mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 20:18:47 +02:00
Added IsItemHoveredOrFocused() (provisional name), better handling of popup/tooltip positioning when using mouse+nav (#323)
This commit is contained in:
1
imgui.h
1
imgui.h
@ -399,6 +399,7 @@ namespace ImGui
|
||||
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();
|
||||
|
Reference in New Issue
Block a user