From f295cda27aaedf2f52841e7d1005651e80ea9644 Mon Sep 17 00:00:00 2001 From: Wojciech Figat Date: Wed, 22 Dec 2021 15:03:25 +0100 Subject: [PATCH] Add doc tooltips for actor types in Toolbox windows --- Source/Editor/Windows/ToolboxWindow.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Editor/Windows/ToolboxWindow.cs b/Source/Editor/Windows/ToolboxWindow.cs index 15d4a0948..aeac41c6d 100644 --- a/Source/Editor/Windows/ToolboxWindow.cs +++ b/Source/Editor/Windows/ToolboxWindow.cs @@ -232,12 +232,15 @@ namespace FlaxEditor.Windows private Item CreateActorItem(string name, Type type) { - return new Item(name, GUI.Drag.DragActorType.GetDragData(type)); + return CreateActorItem(name, new ScriptType(type)); } private Item CreateActorItem(string name, ScriptType type) { - return new Item(name, GUI.Drag.DragActorType.GetDragData(type)); + return new Item(name, GUI.Drag.DragActorType.GetDragData(type)) + { + TooltipText = Editor.Instance.CodeDocs.GetTooltip(type) + }; } private ContainerControl CreateGroupWithList(Tabs parentTabs, string title, float topOffset = 0)