Add helper tooltips for Scene Animation actions UI

This commit is contained in:
Wojtek Figat
2021-08-10 13:54:22 +02:00
parent c1b2fc19c1
commit 62c43f9f95
8 changed files with 38 additions and 32 deletions

View File

@@ -427,6 +427,22 @@ namespace FlaxEditor.Surface
return !TypeUtils.IsDelegate(managedType);
}
internal static string GetVisualScriptTypeDescription(ScriptType type)
{
var sb = new StringBuilder();
if (type.IsStatic)
sb.Append("static ");
else if (type.IsAbstract)
sb.Append("abstract ");
sb.Append(type.TypeName);
var attributes = type.GetAttributes(false);
var tooltipAttribute = (TooltipAttribute)attributes.FirstOrDefault(x => x is TooltipAttribute);
if (tooltipAttribute != null)
sb.Append("\n").Append(tooltipAttribute.Text);
return sb.ToString();
}
internal static string GetVisualScriptMemberInfoDescription(ScriptMemberInfo member)
{
var name = member.Name;