From 516e3fbc65af43ab98fe26127ee6345516d72717 Mon Sep 17 00:00:00 2001 From: Wojciech Figat Date: Mon, 12 Dec 2022 12:17:30 +0100 Subject: [PATCH] Fix Visject surface input box color for missing connection type but with type hint --- Source/Editor/Surface/SurfaceStyle.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Source/Editor/Surface/SurfaceStyle.cs b/Source/Editor/Surface/SurfaceStyle.cs index a39980b66..44701d94a 100644 --- a/Source/Editor/Surface/SurfaceStyle.cs +++ b/Source/Editor/Surface/SurfaceStyle.cs @@ -148,7 +148,16 @@ namespace FlaxEditor.Surface public void GetConnectionColor(ScriptType type, ConnectionsHint hint, out Color color) { if (type == ScriptType.Null) - color = Colors.Default; + { + if (hint == ConnectionsHint.Vector) + color = Colors.Vector; + else if (hint == ConnectionsHint.Scalar) + color = Colors.Float; + else if (hint == ConnectionsHint.Enum) + color = Colors.Enum; + else + color = Colors.Default; + } else if (type.IsPointer || type.IsReference) { // Find underlying type without `*` or `&`