|
|
@ -462,7 +462,7 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Default behavior requires click+release on same spot
|
|
|
|
// Default behavior requires click+release on same spot
|
|
|
|
if ((flags & (ImGuiButtonFlags_PressedOnMask_ & ~ImGuiButtonFlags_PressedOnDragDropHold)) == 0)
|
|
|
|
if ((flags & ImGuiButtonFlags_PressedOnMask_) == 0)
|
|
|
|
flags |= ImGuiButtonFlags_PressedOnClickRelease;
|
|
|
|
flags |= ImGuiButtonFlags_PressedOnClickRelease;
|
|
|
|
|
|
|
|
|
|
|
|
ImGuiWindow* backup_hovered_window = g.HoveredWindow;
|
|
|
|
ImGuiWindow* backup_hovered_window = g.HoveredWindow;
|
|
|
@ -5290,6 +5290,8 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
|
|
|
|
button_flags |= ImGuiButtonFlags_AllowItemOverlap;
|
|
|
|
button_flags |= ImGuiButtonFlags_AllowItemOverlap;
|
|
|
|
if (flags & ImGuiTreeNodeFlags_OpenOnDoubleClick)
|
|
|
|
if (flags & ImGuiTreeNodeFlags_OpenOnDoubleClick)
|
|
|
|
button_flags |= ImGuiButtonFlags_PressedOnDoubleClick | ((flags & ImGuiTreeNodeFlags_OpenOnArrow) ? ImGuiButtonFlags_PressedOnClickRelease : 0);
|
|
|
|
button_flags |= ImGuiButtonFlags_PressedOnDoubleClick | ((flags & ImGuiTreeNodeFlags_OpenOnArrow) ? ImGuiButtonFlags_PressedOnClickRelease : 0);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
button_flags |= ImGuiButtonFlags_PressedOnClickRelease;
|
|
|
|
if (!is_leaf)
|
|
|
|
if (!is_leaf)
|
|
|
|
button_flags |= ImGuiButtonFlags_PressedOnDragDropHold;
|
|
|
|
button_flags |= ImGuiButtonFlags_PressedOnDragDropHold;
|
|
|
|
|
|
|
|
|
|
|
|