public AssetDataDisplay() { Element = new VisualElement().WithClass("result"); Element.AddStyleSheetPath("AssetFinder"); _image = new VisualElement().WithClass("asset-preview"); Element.Add(_image); _name = new SingleHighlightText("highlight", "asset-name"); Element.Add(_name.Container); _path = new SingleHighlightText("highlight", "asset-path"); Element.Add(_path.Container); }
public static void SetText(this SingleHighlightText h, string text, StringMatch match) { h.SetText(text, match.Start, match.Length); }