Skip to content

Commit 9701810

Browse files
committed
TreeNode: adding ImGuiTreeNodeFlags_NoNavFocus in imgui_internal.h (#8551)
1 parent b4bd596 commit 9701810

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

imgui_internal.h

+1
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,7 @@ enum ImGuiSelectableFlagsPrivate_
994994
// Extend ImGuiTreeNodeFlags_
995995
enum ImGuiTreeNodeFlagsPrivate_
996996
{
997+
ImGuiTreeNodeFlags_NoNavFocus = 1 << 27,// Don't claim nav focus when interacting with this item (#8551)
997998
ImGuiTreeNodeFlags_ClipLabelForTrailingButton = 1 << 28,// FIXME-WIP: Hard-coded for CollapsingHeader()
998999
ImGuiTreeNodeFlags_UpsideDownArrow = 1 << 29,// FIXME-WIP: Turn Down arrow into an Up arrow, for reversed trees (#6517)
9991000
ImGuiTreeNodeFlags_OpenOnMask_ = ImGuiTreeNodeFlags_OpenOnDoubleClick | ImGuiTreeNodeFlags_OpenOnArrow,

imgui_widgets.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -6691,6 +6691,8 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
66916691
button_flags |= ImGuiButtonFlags_PressedOnClickRelease | ImGuiButtonFlags_PressedOnDoubleClick;
66926692
else
66936693
button_flags |= ImGuiButtonFlags_PressedOnClickRelease;
6694+
if (flags & ImGuiTreeNodeFlags_NoNavFocus)
6695+
button_flags |= ImGuiButtonFlags_NoNavFocus;
66946696

66956697
bool selected = (flags & ImGuiTreeNodeFlags_Selected) != 0;
66966698
const bool was_selected = selected;

0 commit comments

Comments
 (0)