-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Dragging an item hides hover functionality #1479
Comments
Hello, Two things:
Feel free to detail your usage of drag and drop and post feedback. This API is fairly stable but I want to test more patterns of drag-to-move-objects before locking it. |
Ah I just had to update ImGui, thanks for the hover flags they really help a lot!
And then I have a static class to set the dragging of an item.
I then downcast it and check in the editor code if it is the object it's looking for:
That's pretty much it, I believe most people have a similar setup? |
I don't really know how any of that code connects to your imgui calls. Surely you must be calling something else that just
Unfortunately the answer to that question for many programming problems is often "no" :) Anyway, if you have time to look into the |
Closing as solved afaik? @123tris |
I'm still new to the library so forgive me for my lack of knowledge of the API
As I've tried to implement dragging I've realized that dropping is a bit of a pain. This is because the frame where the mouse released is, the hover detection still doesn't work. This only happens if you drag a UI item like a treenode or a button. I believe this has to do with
ImGui::IsItemActive()
For example:
if (ImGui::IsWindowHovered() && ImGui::IsMouseReleased(0)) std::cout << "test\n";
will not be called if you dragged an item and then released it over the window, it will only be called if you dragged nothing and then released the mouse. Is this intended?This is needed for my drop and drag system, considering that this pretty much is my drop condition.
The text was updated successfully, but these errors were encountered: