mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-15 12:10:09 +00:00
40 lines
937 B
C#
40 lines
937 B
C#
#if UNITY_2019_4_OR_NEWER
|
|
using System;
|
|
|
|
namespace YooAsset.Editor
|
|
{
|
|
public class SingleValueCell : ITableCell, IComparable
|
|
{
|
|
public object CellValue { set; get; }
|
|
public string HeaderTitle { private set; get; }
|
|
public double SingleValue
|
|
{
|
|
get
|
|
{
|
|
return (double)CellValue;
|
|
}
|
|
}
|
|
|
|
public SingleValueCell(string headerTitle, object cellValue)
|
|
{
|
|
HeaderTitle = headerTitle;
|
|
CellValue = cellValue;
|
|
}
|
|
public object GetDisplayObject()
|
|
{
|
|
return CellValue.ToString();
|
|
}
|
|
public int CompareTo(object other)
|
|
{
|
|
if (other is SingleValueCell cell)
|
|
{
|
|
return this.SingleValue.CompareTo(cell.SingleValue);
|
|
}
|
|
else
|
|
{
|
|
return 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endif |