Facepunch / sbox-issues

173 stars 11 forks source link

Extending Graph Editor #3156

Open qualitykk opened 1 year ago

qualitykk commented 1 year ago

What it is?

Right now if you want to extend the Graph Editor and related classes a lot of things are marked as private/internal, making developing your own Graph Editor tools much more of a pain then it should be. I assume the Graph Editor might be reworked at some point like everything else but making stuff accessible would be great for people wanting to try using them early.

What should it be?

Things that you should probably be able to override from deriving classes

GraphView
- CreateNewComment
- CreateNewNode
- CreateNodeUI
- CreateConnection
- BuildFromNodes
- RemoveNode
- RemoveConnection
- OpenContextMenu
- CreateNodeMenu
- PopulateNodeMenu

BaseNode.CreateUI

Plus some things that you should just be able to use from outside the class/assembly in general

GraphView.Connections
Connection.IsAttachedTo
NodeUI.Layout

In addition, ValueEditor could be reworked to work more similarly to property editors but thats not that essential to creating a custom graph editor

QuackCola commented 3 weeks ago

This would be very lovely 🙏