mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-21 09:46:03 +08:00
Added noodle hover highlight
This commit is contained in:
parent
979bd5f7cf
commit
4b073648c9
@ -19,7 +19,7 @@ namespace XNodeEditor {
|
|||||||
private bool IsHoveringNode { get { return hoveredNode != null; } }
|
private bool IsHoveringNode { get { return hoveredNode != null; } }
|
||||||
private bool IsHoveringReroute { get { return hoveredReroute.port != null; } }
|
private bool IsHoveringReroute { get { return hoveredReroute.port != null; } }
|
||||||
private XNode.Node hoveredNode = null;
|
private XNode.Node hoveredNode = null;
|
||||||
[NonSerialized] private XNode.NodePort hoveredPort = null;
|
[NonSerialized] public XNode.NodePort hoveredPort = null;
|
||||||
[NonSerialized] private XNode.NodePort draggedOutput = null;
|
[NonSerialized] private XNode.NodePort draggedOutput = null;
|
||||||
[NonSerialized] private XNode.NodePort draggedOutputTarget = null;
|
[NonSerialized] private XNode.NodePort draggedOutputTarget = null;
|
||||||
[NonSerialized] private XNode.NodePort autoConnectOutput = null;
|
[NonSerialized] private XNode.NodePort autoConnectOutput = null;
|
||||||
|
|||||||
@ -65,7 +65,9 @@ namespace XNodeEditor {
|
|||||||
|
|
||||||
/// <summary> Returned color is used to color noodles </summary>
|
/// <summary> Returned color is used to color noodles </summary>
|
||||||
public virtual Color GetNoodleColor(XNode.NodePort output, XNode.NodePort input) {
|
public virtual Color GetNoodleColor(XNode.NodePort output, XNode.NodePort input) {
|
||||||
return GetTypeColor(output.ValueType);
|
Color col = GetTypeColor(output.ValueType);
|
||||||
|
if (window.hoveredPort == output || window.hoveredPort == input) return Color.Lerp(col, Color.white, 0.8f);
|
||||||
|
return col;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> Returned color is used to color ports </summary>
|
/// <summary> Returned color is used to color ports </summary>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user