Add better formatting for automatic tooltips in Editor from xml comments

This commit is contained in:
Wojtek Figat
2023-11-07 00:26:14 +01:00
parent 4b2595e904
commit a90cf7c28f

View File

@@ -147,6 +147,17 @@ namespace FlaxEditor.Modules.SourceCodeEditing
}
if (key != null)
xml.TryGetValue(key, out text);
// Customize tooltips for properties to be more human-readable in UI
if (text != null && memberType.HasFlag(MemberTypes.Property) && text.StartsWith("Gets or sets ", StringComparison.Ordinal))
{
text = text.Substring(13);
unsafe
{
fixed (char* e = text)
e[0] = char.ToUpper(e[0]);
}
}
}
}