using UnityEngine; namespace UIWidgets { /// /// TreeView. /// [AddComponentMenu("UI/UIWidgets/TreeView")] public class TreeView : TreeViewCustom { /// /// Sets component data with specified item. /// /// Component. /// Item. protected override void SetData(TreeViewComponent component, ListNode item) { component.SetData(item.Node, item.Depth); } /// /// Set highlights colors of specified component. /// /// Component. protected override void HighlightColoring(TreeViewComponent component) { base.HighlightColoring(component); component.Text.color = HighlightedColor; } /// /// Set select colors of specified component. /// /// Component. protected override void SelectColoring(TreeViewComponent component) { base.SelectColoring(component); component.Text.color = SelectedColor; } /// /// Set default colors of specified component. /// /// Component. protected override void DefaultColoring(TreeViewComponent component) { if (component==null) { return ; } base.DefaultColoring(component); if (component.Text!=null) { component.Text.color = DefaultColor; } } } }