Replies: 1 comment 1 reply
-
|
A solution (workaround?) to the first issue is to directly update the There seems to be some animation that indicates the button is being dragged so this might be good enough for my use case. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm new to egui and I ran into something that I can't figure out. I'm trying to create a UI were you can position widgets on the screen by dragging them around. I took some inspiration from the drag and drop demo but I wanted more accurate positioning and I don't need any animations of the background widget while dragging. Here's my latest attempt:
This works in the sense that the button is moved the same amount as the mouse while the mouse button was pressed but there are two problems:
bodyinto a new layer but I don't see how I can do this in my code becausebodyis already moved intoui.scope().scope()as well?I'm still new to egui and gui programming in general so it's possible that the way I'm approaching this is just not optimal. Any pointers would be very welcome. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions