1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 01:06:01 +08:00

142 Commits

Author SHA1 Message Date
ZLX
a3f1394078 Compatible with C# 4.0 language feature. 2021-06-11 13:35:52 +08:00
Thor Brigsted
822b7ae156 Formatting 2020-12-17 13:50:11 +01:00
juliocp
eba850ba98 Merge branch 'changes_to_theme_work' into context_menu_filter 2020-10-12 21:21:25 -03:00
juliocp
fdd9b24eca Added Virtual portStyle
- 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.
2020-10-12 21:17:53 -03:00
juliocp
c316f5d80f Merge remote-tracking branch 'upstream/master' into context_menu_filter 2020-10-12 11:05:00 -03:00
Thor Brigsted
cde52ff21a Formatting 2020-10-12 09:40:40 +02:00
juliocp
b0f20cafa4 renamed dragToCreate to createFilter
- Renamed the preferences dragToCreateFilter to createFilter
- Removed dragToCreate as a condition to use createFilter
2020-10-07 21:08:31 -03:00
juliocp
a03c4c5d0e Added filtered node at port contextMenu
Added compatible menus when the right mouse button is clicked on the port and preferences filter is active
2020-10-07 20:57:40 -03:00
Thor Brigsted
af34ea6c47 Revert "Fixed mouse propagation in custom graph editors. Now you can use buttons and other controls."
This reverts commit 22b379353016739d0d537ee3920299a00ce451f5.
2020-09-09 11:53:51 +02:00
Thor Brigsted
22b3793530 Fixed mouse propagation in custom graph editors. Now you can use buttons and other controls. 2020-09-08 18:43:32 +02:00
MYTNB
85341bf4cc
Add Disconnect(Node) Menu And Node Header Tooltip (#288) 2020-08-11 08:31:53 +02:00
Christiaan Bloemendaal
6c85abf9bc
Fix handles color not being reset to original color (#266)
Co-authored-by: Christiaan Bloemendaal <christiaan@codeglue.com>
2020-05-27 14:20:37 +02:00
Dan Erhardt
bbdbee90a1
Fix to prevent division by 0 (#251) 2020-04-20 16:56:33 +02:00
Simon Rodriguez
76cf825090 Suggestion! A new way of drawing lines very similar to Unitys upcoming Shader Node Editor. 2020-04-13 19:35:52 +02:00
Andrei
5005b5e4f9 Made NodeGraphiEditor's OnGui method virtual and protected, so it can be extended by adding additional content/widgets to be drawn. (#214) 2019-12-15 11:52:22 +01:00
Fernando Molon Toigo
d54a03988a Added virtual GetBodyHighlightStyle (#197) 2019-11-23 01:47:39 +01:00
Thor Brigsted
4edcc3f099 Fixed formatting, fixed dashed stroke style 2019-11-14 17:40:09 +01:00
Simon Rodriguez
ec9c5a99de optimized linq function 2019-11-13 01:14:09 +01:00
Simon Rodriguez
71023e1d58 microoptimization, removes implicit case from vec2 to vec3. 2019-11-13 00:14:29 +01:00
Simon Rodriguez
91eafcc47d the + and * was creating a lot of new vector2s, went down 80% in call time with this 2019-11-13 00:10:45 +01:00
Simon Rodriguez
92ebd59539 reuse the list of grid points instead of creating a new one for each node->port 2019-11-12 23:19:51 +01:00
Simon Rodriguez
8b99a34a63 The in parameter was is available in C# 7.2 and later. This breaks compatibility with earlier versions. 2019-11-12 23:05:33 +01:00
apkd
e15076b34f Use Vector2 in bezier calculations 2019-10-27 16:37:31 +01:00
apkd
455107aabb Optimize NodeEditorGUI.DrawNoodle 2019-10-27 16:30:05 +01:00
Thor Brigsted
421fb5747e Added virtual NodeEditorGraph.GetNoodlePath and GetNoodleStroke for additional customization 2019-10-17 00:16:36 +02:00
Thor Brigsted
08af93c2e3 Added NodeGraphEditor.GetNoodleThickness 2019-10-16 23:08:07 +02:00
Igor Vasiak
63b0bf428b Added gradients to connection noodles (#191)
Upgrade notice: Override GetNoodleGradient instead of GetNoodleColor
2019-10-15 17:13:54 +02:00
Thor Brigsted
085906efd2 Moved default EditorGUIUtility.labelWidth so that it can be overwritten in OnBodyGUI 2019-09-25 16:39:52 +02:00
Thor Brigsted
979bd5f7cf Added nodeGraphEditor.GetNoodleColor
Now you can override the color of noodles!
2019-09-23 23:25:23 +02:00
Thor Brigsted
650522223c Fixed minor jittering with tooltips 2019-08-11 23:52:33 +02:00
Thor Brigsted
25d208d278 Fixed #156 - Incorrect drawing of custom graph editor OnGUI 2019-08-08 09:56:10 +02:00
Thor Brigsted
d45f396ebf Revert "Improved zoom with the help of Jeroenimoo0's PR"
This commit caused issues with the selection box
2019-08-04 22:41:38 +02:00
Thor Brigsted
ba48e32a22 Moved RerouteReference to own script 2019-08-04 22:25:51 +02:00
Thor Brigsted
8e0bd964ad Fixed #107 - OnValidate
OnValidate is now called on rename as well.
Removed outdated OnValidate fix. It probably never worked anyway.
2019-07-01 09:58:47 +02:00
Thor Brigsted
d0e1cd5d66 Fixed #144 - Added virtual GetPortTooltip in NodeGraphEditor 2019-06-29 16:56:50 +02:00
Adsitoz
3ba0b13c77 Zoom System Fixes (#155)
- Due to the OnGUI method being called last to draw over everything else in the window, the GUI.Group being created in the new zoom system was also moving around the GUI elements created in the NodeGraphEditor OnGUI method.
2019-06-18 11:34:23 +02:00
Michael Wigley
8b0eb6bb60 #144 Added option to disable tooltips 2019-06-08 21:01:45 +02:00
Thor Brigsted
53f85a5d22 Improved zoom with the help of Jeroenimoo0's PR 2019-06-08 14:25:07 +02:00
Thor Brigsted
91151b327a Bugfix: Calling base.OnBodyGUI after drawing ports would make noodles disappear 2019-05-09 00:02:58 +02:00
Thor Brigsted
4cf7113740
Improved noodle tangents (#136) 2019-04-14 19:01:26 +02:00
Thor Brigsted
8adc4fd459 Fixed #128, #127, #64 - Added NodeEditorBase.OnCreate, OnGraphEditor.OnOpen, and NodeEditorBase.window 2019-04-06 13:27:44 +02:00
Thor Brigsted
f6e0e3bc4d Added NodeGraphEditor.GetPortColor 2019-04-03 21:50:29 +02:00
Thor Brigsted
57d3a03a91 Removed GetHashCode override.
This should improve performance, but has previously caused a slew of bugs.
Bugtest thoroughly before merging
2019-02-16 12:21:21 +01:00
Thor Brigsted
5b11e81027
Move context menu functions around to allow more customization (#87)
Moved NodeEditorWindow.ShowNodeContextMenu to NodeEditor.AddContextMenuItems
Moved NodeEditorWindow.ShowGraphContextMenu to NodeGraphEditor.AddContextMenuItems
Moved NodeEditorWindow.CreateNode to NodeGraphEditor.CreateNode
2018-12-15 12:40:16 +01:00
Simon Rodriguez
6c1af6f4cd Fix/error on duplicate (#82)
* 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.
2018-12-10 23:33:25 +01:00
Thor Brigsted
6979333eb1 Added [NodeEnum] which fixes enum positions.
#28
2018-11-11 22:39:32 +01:00
Thor Brigsted
e9c6b6f221 Removed middleman function 2018-10-27 19:57:13 +02:00
Thor Brigsted
16992c3972 Added NodeEditor.GetBodyStyle, allowing per-node body styles 2018-10-27 18:41:13 +02:00
Thor Brigsted
f5856f7911 Fixed #66 Minor bug with noodle 2018-10-06 01:34:34 +02:00
Thor Brigsted
ff97cc4494 Switched Dict.ContainsKey out with Dict.TryGetValue for performance gain. 2018-09-09 18:25:41 +02:00