You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version/Branch of Dear ImGui:
Version: 17601
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler: VS 2019
Operating System: Windows 10
My Issue/Question:
I am implementing a simple animation graph and found that ImGui Drag&Drop is perfect to connect nodes with links. The code simply checks if the outer rim of the node was clicked and then creates a payload. I specify ImGuiDragDropFlags_SourceNoPreviewTooltip but still get a default preview from ImGui::EndFrame().
This is where the tooltip is coming from. Not sure what it is checking for and if it should check a the tooltip flag
void ImGui::EndFrame()
{
[SNIP]
// Drag and Drop: Fallback for source tooltip. This is not ideal but better than nothing.
if (g.DragDropActive && g.DragDropSourceFrameCount < g.FrameCount)
{
g.DragDropWithinSource = true;
SetTooltip("...");
g.DragDropWithinSource = false;
}
[SNIP]
}
Is this a bug or I am using anything wrong. I recall this was working for me this way before.
Thanks!
.
The text was updated successfully, but these errors were encountered:
Pushed fix by @rokups now to avoid creating the fallback tooltip when ImGuiDragDropFlags_SourceNoPreviewTooltip is set.
Also see #1725 but why we have this "..." tooltip.
Version/Branch of Dear ImGui:
Version: 17601
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler: VS 2019
Operating System: Windows 10
My Issue/Question:
I am implementing a simple animation graph and found that ImGui Drag&Drop is perfect to connect nodes with links. The code simply checks if the outer rim of the node was clicked and then creates a payload. I specify ImGuiDragDropFlags_SourceNoPreviewTooltip but still get a default preview from ImGui::EndFrame().
`if ( ImGui::IsItemClicked() )
{
const float Padding = 8.0f;
if ( !ImGui::Contains( NodeMin, NodeMax, ImGui::GetMousePos(), Padding ) )
{
if ( ImGui::BeginDragDropSource( ImGuiDragDropFlags_SourceNoPreviewTooltip | ImGuiDragDropFlags_SourceExtern ) )
{
ImVec2 NodeCenter = ( NodeMin + NodeMax ) / 2.0f;
ImGui::SetDragDropPayload( "TRANSITION", &NodeCenter, sizeof( NodeCenter ) );
ImGui::EndDragDropSource();
}
}
This is where the tooltip is coming from. Not sure what it is checking for and if it should check a the tooltip flag
void ImGui::EndFrame()
{
[SNIP]
}
Is this a bug or I am using anything wrong. I recall this was working for me this way before.
Thanks!
.
The text was updated successfully, but these errors were encountered: