setzer22 / egui_node_graph

Build your node graph applications in Rust, using egui
MIT License
715 stars 134 forks source link

Make editor ui work inside egui windows. #19

Closed nodeSpace closed 2 years ago

nodeSpace commented 2 years ago

Proposal to fix #4 Note, this would be a breaking change and will require users to pass in an &ui when calling the draw_graph_editor()

gmorenz commented 2 years ago

I just started using this library and this was the first thing I wanted :+1:

Two nits:

kkngsm commented 2 years ago

(I mistakenly wrote this comment before editing. I don't care. Don't mind.)

I think gmorenz's idea and this modification are excellent.

kkngsm commented 2 years ago

Also, the ctx argument may not be necessary since ctx can be gotten by ui.ctx().

setzer22 commented 2 years ago

I cleared up the merge conflicts and apply some suggestions from this thread. Merging this, thank you all for the great work! :smile:

I also tried to make the example spawn the grap inside a window to showcase the new feature, but this uncovered a couple of QoL issues documented in #27.