38 lines
879 B
C#
38 lines
879 B
C#
using UnityEngine;
|
|
|
|
namespace UIWidgets
|
|
{
|
|
[AddComponentMenu("UI/TreeView", 252)]
|
|
public class TreeView : TreeViewCustom<TreeViewComponent, TreeViewItem>
|
|
{
|
|
protected override void SetData(TreeViewComponent component, ListNode<TreeViewItem> item)
|
|
{
|
|
component.SetData(item.Node, item.Depth);
|
|
}
|
|
|
|
protected override void HighlightColoring(TreeViewComponent component)
|
|
{
|
|
base.HighlightColoring(component);
|
|
component.Text.color = HighlightedColor;
|
|
}
|
|
|
|
protected override void SelectColoring(TreeViewComponent component)
|
|
{
|
|
base.SelectColoring(component);
|
|
component.Text.color = base.SelectedColor;
|
|
}
|
|
|
|
protected override void DefaultColoring(TreeViewComponent component)
|
|
{
|
|
if (!(component == null))
|
|
{
|
|
base.DefaultColoring(component);
|
|
if (component.Text != null)
|
|
{
|
|
component.Text.color = base.DefaultColor;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|