Fixed IsItemHovered() - part of the processing has to be done in ItemAdd() because the widget may alter clipping rectangle temporarily.

This commit is contained in:
omar
2017-09-28 15:43:26 +02:00
parent fafe65a8fc
commit 0106dcbd02
3 changed files with 14 additions and 7 deletions

View File

@ -600,6 +600,7 @@ struct IMGUI_API ImGuiDrawContext
int TreeDepth;
ImGuiID LastItemId;
ImRect LastItemRect;
bool LastItemRectHoveredRect;
bool MenuBarAppending;
float MenuBarOffsetX;
ImVector<ImGuiWindow*> ChildWindows;
@ -639,7 +640,8 @@ struct IMGUI_API ImGuiDrawContext
LogLinePosY = -1.0f;
TreeDepth = 0;
LastItemId = 0;
LastItemRect = ImRect(0.0f,0.0f,0.0f,0.0f);
LastItemRect = ImRect();
LastItemRectHoveredRect = false;
MenuBarAppending = false;
MenuBarOffsetX = 0.0f;
StateStorage = NULL;