update table view

新增单元格视图类
This commit is contained in:
何冠峰
2025-01-17 16:23:31 +08:00
parent c32e7bc525
commit 793a57647d
31 changed files with 1095 additions and 0 deletions
@@ -0,0 +1,12 @@
#if UNITY_2019_4_OR_NEWER
namespace YooAsset.Editor
{
public class AssetPathCell : StringValueCell
{
public AssetPathCell(string headerTitle) : base(headerTitle)
{
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ed1c077653e577846ba29aadb91f13ec
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,20 @@
#if UNITY_2019_4_OR_NEWER
using System;
namespace YooAsset.Editor
{
public class ButtonCell : ITableCell, IComparable
{
public object CellValue { set; get; }
public object GetDisplayObject()
{
return string.Empty;
}
public int CompareTo(object other)
{
return 1;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fe6c2551d70d6934da0b6afce3f1062c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,39 @@
#if UNITY_2019_4_OR_NEWER
using System;
namespace YooAsset.Editor
{
public class IntegerValueCell : ITableCell, IComparable
{
public object CellValue { set; get; }
public string HeaderTitle { private set; get; }
public long IntegerValue
{
get
{
return (long)CellValue;
}
}
public IntegerValueCell(string headerTitle)
{
HeaderTitle = headerTitle;
}
public object GetDisplayObject()
{
return CellValue.ToString();
}
public int CompareTo(object other)
{
if (other is IntegerValueCell cell)
{
return this.IntegerValue.CompareTo(cell.IntegerValue);
}
else
{
return 1;
}
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: be8ecb3981efa744f89ee5d3c9e7b7ad
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,39 @@
#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)
{
HeaderTitle = headerTitle;
}
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
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ae299b7a930e03f458977750de9ca18e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,39 @@
#if UNITY_2019_4_OR_NEWER
using System;
namespace YooAsset.Editor
{
public class StringValueCell : ITableCell, IComparable
{
public object CellValue { set; get; }
public string HeaderTitle { private set; get; }
public string StringValue
{
get
{
return (string)CellValue;
}
}
public StringValueCell(string headerTitle)
{
HeaderTitle = headerTitle;
}
public object GetDisplayObject()
{
return CellValue;
}
public int CompareTo(object other)
{
if (other is StringValueCell cell)
{
return this.StringValue.CompareTo(cell.StringValue);
}
else
{
return 1;
}
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a04fd2585c5538547b9755673aea76df
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: