Browse Source

TreeNodeEx() wired the display-side ImGuiTreeNodeFlags_Selected flag (#581)

pull/624/head
ocornut 9 years ago
parent
commit
ec6471ca87
  1. 2
      imgui.cpp
  2. 2
      imgui.h

2
imgui.cpp

@ -5712,7 +5712,7 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
else
{
// Unframed typed for tree nodes
if (hovered)
if (hovered || (flags & ImGuiTreeNodeFlags_Selected))
RenderFrame(bb.Min, bb.Max, col, false);
RenderCollapseTriangle(bb.Min + ImVec2(padding.x, g.FontSize*0.15f + text_base_offset_y), opened, 0.70f, false);

2
imgui.h

@ -518,7 +518,7 @@ enum ImGuiInputTextFlags_
// Flags for ImGui::TreeNode*(), ImGui::CollapsingHeader*()
enum ImGuiTreeNodeFlags_
{
ImGuiTreeNodeFlags_Selected = 1 << 0, // FIXME: TODO
ImGuiTreeNodeFlags_Selected = 1 << 0, // Draw as selected
ImGuiTreeNodeFlags_Framed = 1 << 1, // Full colored frame (e.g. for CollapsingHeader)
ImGuiTreeNodeFlags_AllowOverlapMode = 1 << 2, // Hit testing to allow subsequent widgets to overlap this one
ImGuiTreeNodeFlags_NoTreePushOnOpen = 1 << 3, // Don't do a TreePush() when opened (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack

Loading…
Cancel
Save