Add hover highlight to Visject surface boxes

#3866
This commit is contained in:
Wojtek Figat
2026-03-31 21:46:21 +02:00
parent 917e62621d
commit ea5e7f1416

View File

@@ -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;