Nav: TreeNode: Added ImGuiTreeNodeFlags_NavCloseFromChild flag, allow closing a TreeNode() from any of child. The explicit flag is not great, perhaps allowing some form of inheritance would help. (#787, #1079)

This commit is contained in:
omar
2018-02-02 17:47:05 +01:00
parent 9120938200
commit ce9d7baaba
3 changed files with 24 additions and 1 deletions

View File

@ -817,6 +817,7 @@ struct IMGUI_API ImGuiDrawContext
float PrevLineTextBaseOffset;
float LogLinePosY;
int TreeDepth;
ImU32 TreeDepthMayCloseOnPop; // Store a copy of !g.NavIdIsAlive for TreeDepth 0..31
ImGuiID LastItemId;
ImRect LastItemRect;
bool LastItemRectHoveredRect;
@ -855,6 +856,7 @@ struct IMGUI_API ImGuiDrawContext
CurrentLineTextBaseOffset = PrevLineTextBaseOffset = 0.0f;
LogLinePosY = -1.0f;
TreeDepth = 0;
TreeDepthMayCloseOnPop = 0x00;
LastItemId = 0;
LastItemRect = ImRect();
LastItemRectHoveredRect = false;