mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
TreeNode() fixed IsItemHovered() being inconsistent with visual behavior (#282)
This commit is contained in:
parent
65fe60f2b2
commit
64fcb5e568
@ -5384,8 +5384,7 @@ bool ImGui::CollapsingHeader(const char* label, const char* str_id, bool display
|
|||||||
const ImRect interact_bb = display_frame ? bb : ImRect(text_bb.Min, text_bb.Max + ImVec2(style.FramePadding.x*2,0.0f)); // FIXME
|
const ImRect interact_bb = display_frame ? bb : ImRect(text_bb.Min, text_bb.Max + ImVec2(style.FramePadding.x*2,0.0f)); // FIXME
|
||||||
bool opened = TreeNodeBehaviorIsOpened(id, (default_open ? ImGuiTreeNodeFlags_DefaultOpen : 0) | (display_frame ? ImGuiTreeNodeFlags_NoAutoExpandOnLog : 0));
|
bool opened = TreeNodeBehaviorIsOpened(id, (default_open ? ImGuiTreeNodeFlags_DefaultOpen : 0) | (display_frame ? ImGuiTreeNodeFlags_NoAutoExpandOnLog : 0));
|
||||||
|
|
||||||
if (!ItemAdd(bb, &id))
|
if (!ItemAdd(interact_bb, &id))
|
||||||
//if (!ItemAdd(interact_bb, &id)) // Correct but would prevent user from accessing rendered bb which may be of use
|
|
||||||
return opened;
|
return opened;
|
||||||
|
|
||||||
bool hovered, held;
|
bool hovered, held;
|
||||||
|
Loading…
Reference in New Issue
Block a user