-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add an example of handling drag-and-drop reordering in a hierarchical list #3903
base: master
Are you sure you want to change the base?
Conversation
Thank you, this will be very useful to help me get drag and drop working in some places in my egui apps, once #3887 is merged. |
#3887 is merged, so this can be rebased |
b2338be
to
c77f28d
Compare
Done |
[package] | ||
name = "hierarchical_list_drag_and_drop" | ||
version = "0.1.0" | ||
authors = ["Emil Ernerfeldt <[email protected]>"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
give yourself some credit :)
@@ -0,0 +1,311 @@ | |||
//! Helpers for drag and drop support. Works well in combination with [`crate::list_item::ListItem`]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we move this module into egui
proper, for anyone to make use of!
This PR adds a demo of using the low-level API introduced in #3887 to implement drag-and-drop reordering in a hierarchical list.
drag_and_drop_5.mp4