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

Added virtual GetBodyHighlightStyle (#197)

This commit is contained in:
Fernando Molon Toigo 2019-11-22 21:47:39 -03:00 committed by Thor Brigsted
parent 30b825ff1c
commit d54a03988a
2 changed files with 7 additions and 3 deletions

View File

@ -100,6 +100,10 @@ namespace XNodeEditor {
return NodeEditorResources.styles.nodeBody; return NodeEditorResources.styles.nodeBody;
} }
public virtual GUIStyle GetBodyHighlightStyle() {
return NodeEditorResources.styles.nodeHighlight;
}
/// <summary> Add items for the context menu when right-clicking this node. Override to add custom menu items. </summary> /// <summary> Add items for the context menu when right-clicking this node. Override to add custom menu items. </summary>
public virtual void AddContextMenuItems(GenericMenu menu) { public virtual void AddContextMenuItems(GenericMenu menu) {
// Actions if only one node is selected // Actions if only one node is selected

View File

@ -413,7 +413,7 @@ namespace XNodeEditor {
if (selected) { if (selected) {
GUIStyle style = new GUIStyle(nodeEditor.GetBodyStyle()); GUIStyle style = new GUIStyle(nodeEditor.GetBodyStyle());
GUIStyle highlightStyle = new GUIStyle(NodeEditorResources.styles.nodeHighlight); GUIStyle highlightStyle = new GUIStyle(nodeEditor.GetBodyHighlightStyle());
highlightStyle.padding = style.padding; highlightStyle.padding = style.padding;
style.padding = new RectOffset(); style.padding = new RectOffset();
GUI.color = nodeEditor.GetTint(); GUI.color = nodeEditor.GetTint();