diff --git a/Scripts/Editor/NodeEditor.cs b/Scripts/Editor/NodeEditor.cs index 13440ea..eae80cd 100644 --- a/Scripts/Editor/NodeEditor.cs +++ b/Scripts/Editor/NodeEditor.cs @@ -100,6 +100,10 @@ namespace XNodeEditor { return NodeEditorResources.styles.nodeBody; } + public virtual GUIStyle GetBodyHighlightStyle() { + return NodeEditorResources.styles.nodeHighlight; + } + /// Add items for the context menu when right-clicking this node. Override to add custom menu items. public virtual void AddContextMenuItems(GenericMenu menu) { // Actions if only one node is selected @@ -143,4 +147,4 @@ namespace XNodeEditor { } } } -} \ No newline at end of file +} diff --git a/Scripts/Editor/NodeEditorGUI.cs b/Scripts/Editor/NodeEditorGUI.cs index c41afd0..74530d8 100644 --- a/Scripts/Editor/NodeEditorGUI.cs +++ b/Scripts/Editor/NodeEditorGUI.cs @@ -413,7 +413,7 @@ namespace XNodeEditor { if (selected) { GUIStyle style = new GUIStyle(nodeEditor.GetBodyStyle()); - GUIStyle highlightStyle = new GUIStyle(NodeEditorResources.styles.nodeHighlight); + GUIStyle highlightStyle = new GUIStyle(nodeEditor.GetBodyHighlightStyle()); highlightStyle.padding = style.padding; style.padding = new RectOffset(); GUI.color = nodeEditor.GetTint(); @@ -524,4 +524,4 @@ namespace XNodeEditor { } } } -} \ No newline at end of file +}