- Added the GetPortStyle(...) as virtual method at GraphEditor.
With this, users can customize the texture for different ports, and they can also modify the padding without having to overwrite the default xNode style.
This prevents many problems when working with multiple graphics.
The style properties used from Style is:
- padding-left.
- padding-right.
- normal.background, to border texture.
- active.background, to dot texture.
Some useful methods for research.
Now with these methods and the previous commit it is now possible to play not only with the theme of xNode but also with the functionality of ports, nodes and noodles.
I made these variables public to be able to work with more information from GraphEditor. They are only Boolean and do not pose any danger.
- IsDraggingPort:
- IsHoveringPort
- IsHoveringNode
- IsHoveringReroute
* add a drag threshold so right clicks are better distinguished from right drags especially on large screens
* ignore mac files too
* dont use less than 1 as a drag threshold
Co-authored-by: Chris Fairclough <chris@zulleon.com>
1. Add a node
2. Drag a port and create a new node that it connects to
3. Delete that latest node
4. Create it with just right click, the first node will autoconnect to it
Complete fix to address bluriness of the UI in the Node Editor Window. Previous fixes were not all encompassing and failed to account for now even dimensions of Editor Window.
Moved NodeEditorWindow.ShowNodeContextMenu to NodeEditor.AddContextMenuItems
Moved NodeEditorWindow.ShowGraphContextMenu to NodeGraphEditor.AddContextMenuItems
Moved NodeEditorWindow.CreateNode to NodeGraphEditor.CreateNode
* Pressing CTRL+D (duplicate) threw editorgui exception "Getting control 0s position in a group with only 3 controls when doing ValidateCommand".
comparing to https://github.com/Unity-Technologies/UnityCsReference/blob/master/Editor/Mono/SceneHierarchyWindow.cs : row 211, the proper use of the event was not made.
also fixed spelling of Dublicate to Duplicate.
* Braces on wrong lines.
* Something got wrong with the comments.