Nuklear
Nuklear copied to clipboard
Node editor demo expanded
This PR expands on the node editor demo to make it a functional example of a node-based UI.
Features:
- multiple node types
- multiple connector types
- linking between connectors of the same type
- detaching and reattaching links
- getting value from linked node if slot is connected
Some notes:
- only tested with the glfw_opengl3 backend
- uses system malloc, not sure if nk_malloc should be preferred.
- uses the standard panel close button , then checks for NK_WINDOW_HIDDEN whether to delete a node or display it. Not sure if there's some pitfall here.
Nice stuff
I like where this is going. I'm not sure what's wrong with the demo though? This is the sdl_renderer....
@RobLoach Can you click the connectors to draw a link or right click to add nodes?
Maybe there should be some more nodes or at least links in the initial state. I realize now that for someone not used to a node-based UI it might be non-obvious what to do.
Ok, finally did this slight update to the init state. Screenshot attached.
Nice work! I ran it on glfw_opengl3
and x11_xft
demos (screenshot for the later below)