IsWindowHovered(): Added ImGuiHoveredFlags_FlattenChilds flag. Made IsRootWindowOrAnyChildHovered() obsolete in favor of IsWindowHovered( ImGuiHoveredFlags_FlattenChilds) (#1382, #1404)
-2017/10/20(1.52)-markedIsItemHoveredRect()/IsMouseHoveringWindow()asobsolete,infavorofusingthenewlyintroducedflagsforIsItemHovered()andIsWindowHovered().Seehttps://github.com/ocornut/imgui/issues/1382 for details.
IM_ASSERT((flags&ImGuiHoveredFlags_FlattenChilds)==0);// Flags not supported by this function
// [2017/10/16] Reverted commit 344d48be3 and testing RootWindow instead. I believe it is correct to NOT test for RootWindow but this leaves us unable to use IsItemHovered() after EndChild() itself.
// Until a solution is found I believe reverting to the test from 2017/09/27 is safe since this was the test that has been running for a long while.
IMGUI_APIboolIsWindowHovered(ImGuiHoveredFlagsflags=0);// is current Begin()-ed window hovered (and typically: not blocked by a popup/modal)?
IMGUI_APIboolIsRootWindowFocused();// is current Begin()-ed root window focused (root = top-most parent of a child, otherwise self)?
IMGUI_APIboolIsRootWindowOrAnyChildFocused();// is current Begin()-ed root window or any of its child (including current window) focused?
IMGUI_APIboolIsRootWindowOrAnyChildHovered(ImGuiHoveredFlagsflags=0);// is current Begin()-ed root window or any of its child (including current window) hovered and hoverable (not blocked by a popup)?
IMGUI_APIboolIsAnyWindowHovered();// is mouse hovering any visible window
IMGUI_APIboolIsRectVisible(constImVec2&size);// test if rectangle (of given size, starting from cursor position) is visible / not clipped.
IMGUI_APIboolIsRectVisible(constImVec2&rect_min,constImVec2&rect_max);// test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.
@ -580,6 +579,7 @@ enum ImGuiHoveredFlags_
//ImGuiHoveredFlags_AllowWhenBlockedByModal = 1 << 1, // Return true even if a modal popup window is normally blocking access to this item/window. FIXME-TODO: Unavailable yet.
ImGuiHoveredFlags_AllowWhenBlockedByActiveItem=1<<2,// Return true even if an active item is blocking access to this item/window
ImGuiHoveredFlags_AllowWhenOverlapped=1<<3,// Return true even if the position is overlapped by another window
ImGuiHoveredFlags_FlattenChilds=1<<4,// Treat all child windows as the same window (for IsWindowHovered())
staticinlineboolIsRootWindowOrAnyChildHovered(ImGuiHoveredFlagsflags=0){returnIsItemHovered(flags|ImGuiHoveredFlags_FlattenChilds);}// OBSOLETE 1.53+ use flags directly
boolBegin(constchar*name,bool*p_open,constImVec2&size_on_first_use,floatbg_alpha_override=-1.0f,ImGuiWindowFlagsflags=0);// OBSOLETE 1.52+. use SetNextWindowSize() instead if you want to set a window size.
// Testing IsItemHovered() function (because BulletText is an item itself and that would affect the output of IsItemHovered, we pass all lines in a single items to shorten the code)