...when the hovered location is located within a child window, e.g. InputTextMultiline().
This is intended to have no side effects, but brace yourself for the possible comeback..
This essentially makes IsItemHovered() not accept hover from child windows, but EndChild/EndGroup are forwarded.
More or less should fix/revert c76f014292 which was a revert of 344d48be3
IM_ASSERT((flags&(ImGuiHoveredFlags_RootWindow|ImGuiHoveredFlags_ChildWindows))==0);// Flags not supported by this function
IM_ASSERT((flags&(ImGuiHoveredFlags_RootWindow|ImGuiHoveredFlags_ChildWindows))==0);// Flags not supported by this function
// Test if we are hovering the right window (our window could be behind another window)
// Test if we are hovering the right window (our window could be behind another window)
// [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.
// [2021/03/02] Reworked / reverted the revert, finally. Note we want e.g. BeginGroup/ItemAdd/EndGroup to work as well. (#3851)
// 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.
// [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
//if (g.HoveredWindow != window)
// 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
// return false;
// the test that has been running for a long while.
ImGuiItemStatusFlags_HasDisplayRect=1<<1,// LastItemDisplayRect is valid
ImGuiItemStatusFlags_Edited=1<<2,// Value exposed by item was edited in the current frame (should match the bool return value of most widgets)
ImGuiItemStatusFlags_Edited=1<<2,// Value exposed by item was edited in the current frame (should match the bool return value of most widgets)
ImGuiItemStatusFlags_ToggledSelection=1<<3,// Set when Selectable(), TreeNode() reports toggling a selection. We can't report "Selected" because reporting the change allows us to handle clipping with less issues.
ImGuiItemStatusFlags_ToggledSelection=1<<3,// Set when Selectable(), TreeNode() reports toggling a selection. We can't report "Selected" because reporting the change allows us to handle clipping with less issues.
ImGuiItemStatusFlags_ToggledOpen=1<<4,// Set when TreeNode() reports toggling their open state.
ImGuiItemStatusFlags_ToggledOpen=1<<4,// Set when TreeNode() reports toggling their open state.
ImGuiItemStatusFlags_HasDeactivated=1<<5,// Set if the widget/group is able to provide data for the ImGuiItemStatusFlags_Deactivated flag.
ImGuiItemStatusFlags_HasDeactivated=1<<5,// Set if the widget/group is able to provide data for the ImGuiItemStatusFlags_Deactivated flag.
ImGuiItemStatusFlags_Deactivated=1<<6// Only valid if ImGuiItemStatusFlags_HasDeactivated is set.
ImGuiItemStatusFlags_Deactivated=1<<6,// Only valid if ImGuiItemStatusFlags_HasDeactivated is set.
ImGuiItemStatusFlags_HoveredWindow=1<<7// Override the HoveredWindow test to allow cross-window hover testing.
#ifdef IMGUI_ENABLE_TEST_ENGINE
#ifdef IMGUI_ENABLE_TEST_ENGINE
,// [imgui_tests only]
,// [imgui_tests only]
@ -924,7 +925,7 @@ struct ImGuiStyleMod
};
};
// Stacked storage data for BeginGroup()/EndGroup()
// Stacked storage data for BeginGroup()/EndGroup()