setzer22 / egui_node_graph

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

Hide close button of node widget #75

Closed huisedenanhai closed 1 year ago

huisedenanhai commented 2 years ago

I'm working on my render graph editor. There are two special nodes called Input and Output. They should exist for all my node graphs, can not be created by the user, nor can be deleted.

I want to hide the close button for my Input/Output node. Currently I found no existing way to do this.

There can be a method fn can_delete(&self) -> bool for NodeDataTrait, so the nodes can decide whether it is deletable.

I implemented it on my fork. I can make a pr if you like.

setzer22 commented 2 years ago

This sounds like a good feature to have! Yes, please, a PR would be great :smile:

huisedenanhai commented 2 years ago

PR here

setzer22 commented 1 year ago

Fixed in #76