From ea5e7f14160626ff6c322e20f2c26938fa8202d1 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 31 Mar 2026 21:46:21 +0200 Subject: [PATCH] Add hover highlight to Visject surface boxes #3866 --- Source/Editor/Surface/SurfaceStyle.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/Editor/Surface/SurfaceStyle.cs b/Source/Editor/Surface/SurfaceStyle.cs index 4fc656823..2997e1d21 100644 --- a/Source/Editor/Surface/SurfaceStyle.cs +++ b/Source/Editor/Surface/SurfaceStyle.cs @@ -244,8 +244,13 @@ namespace FlaxEditor.Surface else icon = hasConnections ? style.Icons.BoxClose : style.Icons.BoxOpen; color *= box.ConnectionsHighlightIntensity + 1; - - // Disable vertex snapping to prevent position jitter/ snapping artefacts for the boxes when zooming the surface + if (box.IsMouseOver) + { + color *= 1.3f; + rect = rect.MakeExpanded(1.0f); + } + + // Disable vertex snapping to prevent position jitter/snapping artefacts for the boxes when zooming the surface var features = Render2D.Features; Render2D.Features = features & ~Render2D.RenderingFeatures.VertexSnapping;