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:
parent
30b825ff1c
commit
d54a03988a
@ -100,6 +100,10 @@ namespace XNodeEditor {
|
||||
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>
|
||||
public virtual void AddContextMenuItems(GenericMenu menu) {
|
||||
// Actions if only one node is selected
|
||||
@ -143,4 +147,4 @@ namespace XNodeEditor {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user