public override void DrawForeground() { var inputHasConnection = inputs[0].port.hasAnyConnection; var outputHasConnection = outputs[0].port.hasAnyConnection; mouseIsOver = new Rect(_position.x - 20, _position.y - 10, mouseIsOver ? 80 : 40, 40).Contains(mousePosition); #if VISUAL_SCRIPTING_1_7_3 _position.width = 26; GraphGUI.Node(new Rect(position.x, position.y + 3, 26, _position.height - 4), NodeShape.Square, NodeColor.Gray, isSelected); #else if (isSelected || mouseIsOver || !inputHasConnection || !outputHasConnection) { _position.width = 26; GraphGUI.Node(new Rect(position.x, position.y + 3, 26, _position.height - 4), NodeShape.Square, NodeColor.Gray, isSelected); } else { _position.width = -19; } #endif Reposition(); }
public override void DrawForeground() { GraphGUI.Node(new Rect(position.x, position.y, _position.width, _position.height), NodeShape.Square, NodeColor.Gray, isSelected); }