-
Notifications
You must be signed in to change notification settings - Fork 137
Conversation
Now I am working on trunk support |
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.
Thanks! Looks like this was an easy upgrade :) EDIT: See below 😅
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.
Ooops, sorry about the hasty review. I have pulled the changes and it looks like the upgrade may take a bit more work than this. If you try running the examples and moving things around you'll see it's no longer working. You can't move nodes or alter their values.
This is probably related to this breaking change in 0.20:
⚠️ BREAKING: if you have overlapping interactive widgets, only the top widget (last added) will be interactive (emilk/egui#2244).
I suspect how this is an issue, since the way we were doing background click detection conflicts with this new way of handling events in egui. Shouldn't be a difficult fix but unfortunately I don't have a lot of time to debug this right now.
I'm sorry... It was an overall bug. |
No worries 🙂 |
Details
|
Support trunk |
Oh... sorry. |
Yeah, the problem with using But it seems you're going in a good direction. At least with this current version #71 is no longer an issue. 😄 We just need to figure out a way to have both things working. |
I just realized there's also another problem with using an area: It would allow nodes to be drawn on top of any other area like Windows, but we typically don't want that. Egui doesn't expose a way to control the layer order of areas, and will "raise" whichever area was interacted to the top. It wouldn't be so much the nodes being "inside" the node editor but floating "above" it like every other window. This might cause trouble in certain applications. |
I agree. It seems that using Area was not a good idea. I'll give it some more thought. And, I feel that the other Frame and Trunk commits are useful and independent of egui0.20 and would be better split into a separate PR. |
Hi, Is there any update about that? |
No, it has not been corrected since then. |
@ferid-akifzade I'm sorry, I haven't had time to debug this either 😅. I've been a bit bugged by several of egui's limitations, so I am currently working on a project that drops down to I'm still interested in updating this library, but since I am not currently using egui 0.20, it's a bit hard to find time to commit to this fix. This sounded like it should've been an easy fix, but when I tried it I realized it's not as easy as I thought because of the way the new way input events are consumed in 0.20. |
FYI: egui v0.21 has been released: egui - Rust I tried this PR with egui v 0.21, I can't compile....
|
It looks great! I hope it will go well.
I fixed most of the errors and can compile and run the corrected version. But like egui 0.20 version interacting with nodes not working. I don't know why. |
We already know that Area is inappropriate, so I removed the code using Area. |
The current problem is that I need Currently, responses are obtained in two places.
egui_node_graph/egui_node_graph/src/editor_ui.rs Lines 794 to 798 in 89186a6
However, with the update of egui's event system, this no longer works. Perhaps window_response was a bad hack. For example, I expect that we can use the Response of the Frame used to draw the node in this PR. egui_node_graph/egui_node_graph/src/editor_ui.rs Lines 521 to 580 in 89186a6
But I've tried several patterns and they haven't worked. |
Thinking emilk/egui#2947 and emilk/egui#2471 are probably related. Debugged some: println!(
"{:?} {:?}",
window_response.drag_delta(),
window_response.clicked_by(PointerButton::Primary)
); These always return 0.0, 0.0 and false. One could probably hack around it |
Thank you all for the hard work, and sorry it took me a while to get back to this PR :) It seems #85 supersedes this? |
Sorry for not being involved in the discussion lately. I think it's so good! |
Stroke::none()
withStroke::None