47 lines
961 B
C#
47 lines
961 B
C#
using UIWidgets;
|
|
|
|
namespace UIWidgetsSamples.ToDoList
|
|
{
|
|
public class ToDoListView : ListViewCustomHeight<ToDoListViewComponent, ToDoListItem>
|
|
{
|
|
private bool isStarted;
|
|
|
|
protected override void Awake()
|
|
{
|
|
Start();
|
|
}
|
|
|
|
public override void Start()
|
|
{
|
|
if (!isStarted)
|
|
{
|
|
isStarted = true;
|
|
base.Start();
|
|
}
|
|
}
|
|
|
|
protected override void SetData(ToDoListViewComponent component, ToDoListItem item)
|
|
{
|
|
component.SetData(item);
|
|
}
|
|
|
|
protected override void HighlightColoring(ToDoListViewComponent component)
|
|
{
|
|
base.HighlightColoring(component);
|
|
component.Task.color = HighlightedColor;
|
|
}
|
|
|
|
protected override void SelectColoring(ToDoListViewComponent component)
|
|
{
|
|
base.SelectColoring(component);
|
|
component.Task.color = base.SelectedColor;
|
|
}
|
|
|
|
protected override void DefaultColoring(ToDoListViewComponent component)
|
|
{
|
|
base.DefaultColoring(component);
|
|
component.Task.color = base.DefaultColor;
|
|
}
|
|
}
|
|
}
|