mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-21 01:36:03 +08:00
Node hover update finished
This commit is contained in:
parent
23a3e0e732
commit
554a85cb71
@ -153,6 +153,8 @@ public partial class NodeEditorWindow {
|
|||||||
|
|
||||||
Vector2 mousePos = Event.current.mousePosition;
|
Vector2 mousePos = Event.current.mousePosition;
|
||||||
|
|
||||||
|
hoveredPort = null;
|
||||||
|
hoveredNode = null;
|
||||||
|
|
||||||
foreach (Node node in graph.nodes) {
|
foreach (Node node in graph.nodes) {
|
||||||
if (node == null) return;
|
if (node == null) return;
|
||||||
@ -191,8 +193,7 @@ public partial class NodeEditorWindow {
|
|||||||
|
|
||||||
//Check if we are hovering any of this nodes ports
|
//Check if we are hovering any of this nodes ports
|
||||||
//Check input 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];
|
NodePort port = node.inputs[i];
|
||||||
//Check if port rect is available
|
//Check if port rect is available
|
||||||
if (!portConnectionPoints.ContainsKey(port)) continue;
|
if (!portConnectionPoints.ContainsKey(port)) continue;
|
||||||
@ -200,8 +201,7 @@ public partial class NodeEditorWindow {
|
|||||||
if (r.Contains(mousePos)) hoveredPort = port;
|
if (r.Contains(mousePos)) hoveredPort = port;
|
||||||
}
|
}
|
||||||
//Check all output ports
|
//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];
|
NodePort port = node.outputs[i];
|
||||||
//Check if port rect is available
|
//Check if port rect is available
|
||||||
if (!portConnectionPoints.ContainsKey(port)) continue;
|
if (!portConnectionPoints.ContainsKey(port)) continue;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user