Add tooltips to actors in scene tree and to properties General panel header

#182
This commit is contained in:
Wojciech Figat
2021-12-09 17:10:34 +01:00
parent 2b1e5e4958
commit 141022caf8
2 changed files with 19 additions and 1 deletions

View File

@@ -201,6 +201,21 @@ namespace FlaxEditor.SceneGraph.GUI
base.Update(deltaTime);
}
/// <inheritdoc />
protected override bool ShowTooltip => true;
/// <inheritdoc />
public override bool OnShowTooltip(out string text, out Vector2 location, out Rectangle area)
{
// Evaluate tooltip text once it's actually needed
var actor = _actorNode.Actor;
if (string.IsNullOrEmpty(TooltipText) && actor)
TooltipText = Surface.SurfaceUtils.GetVisualScriptTypeDescription(TypeUtils.GetObjectType(actor));
return base.OnShowTooltip(out text, out location, out area);
}
/// <inheritdoc />
protected override Color CacheTextColor()
{