// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved. using FlaxEditor.Content; using FlaxEditor.GUI.ContextMenu; using FlaxEngine; using FlaxEngine.GUI; namespace FlaxEditor.Windows.Search { /// /// The item. /// [HideInEditor] internal class SearchItem : ContainerControl { private ContentFinder _finder; /// /// The item icon. /// protected Image _icon; /// /// The item name. /// public string Name; /// /// The item type name. /// public string Type; /// /// The item object reference. /// public object Item; /// /// Initializes a new instance of the class. /// /// The name. /// The type. /// The item. /// The finder. /// The item width. /// The item height. public SearchItem(string name, string type, object item, ContentFinder finder, float width, float height) { Size = new Float2(width, height); Name = name; Type = type; Item = item; _finder = finder; var logoSize = 15.0f; var icon = new Image { Size = new Float2(logoSize), Location = new Float2(5, (height - logoSize) / 2) }; _icon = icon; var nameLabel = AddChild