From 732b34d28b3916895f75ee426489973bff8d0cca Mon Sep 17 00:00:00 2001 From: xxSeys1 Date: Mon, 3 Jun 2024 20:45:20 +0200 Subject: [PATCH 1/3] Draw impulse/ execution lines thicker than data ones Slightly increases the thickness of impulse/ execution lines for node editors to make it easier for the user to follow execution flow (and indirectly also data flow) --- Source/Editor/Surface/Elements/OutputBox.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Editor/Surface/Elements/OutputBox.cs b/Source/Editor/Surface/Elements/OutputBox.cs index 558d9d7e4..c7bb0408f 100644 --- a/Source/Editor/Surface/Elements/OutputBox.cs +++ b/Source/Editor/Surface/Elements/OutputBox.cs @@ -202,6 +202,12 @@ namespace FlaxEditor.Surface.Elements highlight += DefaultConnectionThickness * 0.5f; } + // Increase thickness on impulse/ execution lines + if (targetBox.CurrentType.IsVoid) + { + highlight += 1.25f; + } + DrawConnection(style, ref startPos, ref endPos, ref color, highlight); } } From 106b48f4d5d52f87b9c97094602e1f0c4006fc96 Mon Sep 17 00:00:00 2001 From: xxSeys1 Date: Mon, 3 Jun 2024 22:31:16 +0200 Subject: [PATCH 2/3] Code style fixes Changed two if statements to be single line. --- Source/Editor/Surface/Elements/OutputBox.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Source/Editor/Surface/Elements/OutputBox.cs b/Source/Editor/Surface/Elements/OutputBox.cs index c7bb0408f..ff91d2595 100644 --- a/Source/Editor/Surface/Elements/OutputBox.cs +++ b/Source/Editor/Surface/Elements/OutputBox.cs @@ -198,15 +198,11 @@ namespace FlaxEditor.Surface.Elements // TODO: Figure out how to only draw the topmost connection if (IntersectsConnection(ref startPos, ref endPos, ref mousePosition, mouseOverDistance)) - { highlight += DefaultConnectionThickness * 0.5f; - } // Increase thickness on impulse/ execution lines if (targetBox.CurrentType.IsVoid) - { highlight += 1.25f; - } DrawConnection(style, ref startPos, ref endPos, ref color, highlight); } From 2b46f04bafbd6b95d4e2922b30a02988b3782867 Mon Sep 17 00:00:00 2001 From: xxSeys1 Date: Mon, 3 Jun 2024 23:25:54 +0200 Subject: [PATCH 3/3] Changed how thickness is calculated Now works with the stuff done in #2671. --- Source/Editor/Surface/Elements/OutputBox.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Editor/Surface/Elements/OutputBox.cs b/Source/Editor/Surface/Elements/OutputBox.cs index ff91d2595..58bdbcc4f 100644 --- a/Source/Editor/Surface/Elements/OutputBox.cs +++ b/Source/Editor/Surface/Elements/OutputBox.cs @@ -202,7 +202,7 @@ namespace FlaxEditor.Surface.Elements // Increase thickness on impulse/ execution lines if (targetBox.CurrentType.IsVoid) - highlight += 1.25f; + highlight *= 2; DrawConnection(style, ref startPos, ref endPos, ref color, highlight); }