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;
|
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
|
||||||
|
|||||||
@ -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();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user