1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 17:26:02 +08:00

Node hover update finished

This commit is contained in:
Thor Brigsted 2017-10-16 23:43:23 +02:00
parent 23a3e0e732
commit 554a85cb71

View File

@ -153,6 +153,8 @@ public partial class NodeEditorWindow {
Vector2 mousePos = Event.current.mousePosition;
hoveredPort = null;
hoveredNode = null;
foreach (Node node in graph.nodes) {
if (node == null) return;
@ -191,8 +193,7 @@ public partial class NodeEditorWindow {
//Check if we are hovering any of this nodes ports
//Check input ports
for (int i = 0; i < node.InputCount; i++)
{
for (int i = 0; i < node.InputCount; i++) {
NodePort port = node.inputs[i];
//Check if port rect is available
if (!portConnectionPoints.ContainsKey(port)) continue;
@ -200,8 +201,7 @@ public partial class NodeEditorWindow {
if (r.Contains(mousePos)) hoveredPort = port;
}
//Check all output ports
for (int i = 0; i < node.OutputCount; i++)
{
for (int i = 0; i < node.OutputCount; i++) {
NodePort port = node.outputs[i];
//Check if port rect is available
if (!portConnectionPoints.ContainsKey(port)) continue;