mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 09:16:01 +08:00
Fixed #119 - node port background color inconsistency
This commit is contained in:
parent
bb847a3044
commit
5bc267d23b
@ -139,9 +139,8 @@ namespace XNodeEditor {
|
|||||||
|
|
||||||
rect.size = new Vector2(16, 16);
|
rect.size = new Vector2(16, 16);
|
||||||
|
|
||||||
Color backgroundColor = new Color32(90, 97, 105, 255);
|
NodeEditor editor = NodeEditor.GetEditor(port.node, NodeEditorWindow.current);
|
||||||
Color tint;
|
Color backgroundColor = editor.GetTint();
|
||||||
if (port.node.GetType().TryGetAttributeTint(out tint)) backgroundColor *= tint;
|
|
||||||
Color col = NodeEditorWindow.current.graphEditor.GetPortColor(port);
|
Color col = NodeEditorWindow.current.graphEditor.GetPortColor(port);
|
||||||
DrawPortHandle(rect, backgroundColor, col);
|
DrawPortHandle(rect, backgroundColor, col);
|
||||||
|
|
||||||
@ -176,7 +175,6 @@ namespace XNodeEditor {
|
|||||||
|
|
||||||
Rect rect = GUILayoutUtility.GetLastRect();
|
Rect rect = GUILayoutUtility.GetLastRect();
|
||||||
position = rect.position - new Vector2(16, 0);
|
position = rect.position - new Vector2(16, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
// If property is an output, display a text label and put a port handle on the right side
|
// If property is an output, display a text label and put a port handle on the right side
|
||||||
else if (port.direction == XNode.NodePort.IO.Output) {
|
else if (port.direction == XNode.NodePort.IO.Output) {
|
||||||
@ -195,9 +193,8 @@ namespace XNodeEditor {
|
|||||||
|
|
||||||
Rect rect = new Rect(position, new Vector2(16, 16));
|
Rect rect = new Rect(position, new Vector2(16, 16));
|
||||||
|
|
||||||
Color backgroundColor = new Color32(90, 97, 105, 255);
|
NodeEditor editor = NodeEditor.GetEditor(port.node, NodeEditorWindow.current);
|
||||||
Color tint;
|
Color backgroundColor = editor.GetTint();
|
||||||
if (port.node.GetType().TryGetAttributeTint(out tint)) backgroundColor *= tint;
|
|
||||||
Color col = NodeEditorWindow.current.graphEditor.GetPortColor(port);
|
Color col = NodeEditorWindow.current.graphEditor.GetPortColor(port);
|
||||||
DrawPortHandle(rect, backgroundColor, col);
|
DrawPortHandle(rect, backgroundColor, col);
|
||||||
|
|
||||||
@ -223,9 +220,8 @@ namespace XNodeEditor {
|
|||||||
|
|
||||||
rect.size = new Vector2(16, 16);
|
rect.size = new Vector2(16, 16);
|
||||||
|
|
||||||
Color backgroundColor = new Color32(90, 97, 105, 255);
|
NodeEditor editor = NodeEditor.GetEditor(port.node, NodeEditorWindow.current);
|
||||||
Color tint;
|
Color backgroundColor = editor.GetTint();
|
||||||
if (port.node.GetType().TryGetAttributeTint(out tint)) backgroundColor *= tint;
|
|
||||||
Color col = NodeEditorWindow.current.graphEditor.GetPortColor(port);
|
Color col = NodeEditorWindow.current.graphEditor.GetPortColor(port);
|
||||||
DrawPortHandle(rect, backgroundColor, col);
|
DrawPortHandle(rect, backgroundColor, col);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user