-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag drop does not work with Child #7539
Comments
It doesn't indeed, but I'm not sure we can make it work as it would be a relatively ambiguous behavior. You might submit an invisible button covering the child window as the last item in the window, and use as a drop source. Have you tried that? (not same problem, but similar idea as what's used in #3379) |
interesting post(#3379). Here is a picture Each of the blocks on saying "Wait" are movement commands for a robot. Each of those commands has multiple inputs and so on and I want to be able to reorder them by dragging them on top or inbetween of each other. To reflect on your response... I can put a button within the child on the lowest z level just above the child (cause I need to be able to reach the widgets in the child. Is that right? |
You can use an |
You can add the undocumented However, I think your nested use of Instead of BeginChild(); //LeftGrayBar
EndChild();
BeginChild(); //with all other elements
EndChild();
InvisibleButton(); You can use:
BeginGroup() will lock the X coordinates. You can also use Indent() to adjust it. |
Good to know, thank you. |
Version/Branch of Dear ImGui:
v1.90.4 / Main
Back-ends:
imgui_impl_sdl2.cpp + imgui_impl_sdlrenderer2.cpp
Compiler, OS:
Windows 10 + CLion + Bundled MinGW
Full config/build information:
No response
Details:
Hi,
I am trying to drag drop a child;
I have been successfully dropping onto a child. But whenever I try to drag a child
ImGui::BeginDragDropSource()
returns false;i have gone trough some iterations of testing.
First I got an Assert error for line 12890 refering to this:
i figured that a child (even with id) might fall under the group of items without unique identifyer but so I included the flag: "ImGuiDragDropFlags_SourceAllowNullID"
This avoided the Assert, yet
BeginDragDropSource()
still returned false;Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
Here is the way I tested it
The text was updated successfully, but these errors were encountered: