update UIElements

This commit is contained in:
何冠峰
2025-01-20 10:07:16 +08:00
parent 793a57647d
commit 5e2fc84ebf
8 changed files with 174 additions and 28 deletions
@@ -0,0 +1,50 @@
#if UNITY_2019_4_OR_NEWER
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace YooAsset.Editor
{
public class DefaultTableData : ITableData
{
/// <summary>
/// 是否可见
/// </summary>
public bool Visible { set; get; } = true;
/// <summary>
/// 单元格集合
/// </summary>
public IList<ITableCell> Cells { set; get; } = new List<ITableCell>();
#region 添加默认的单元格数据
public void AddButtonCell()
{
var cell = new ButtonCell();
Cells.Add(cell);
}
public void AddAssetPathCell(string headerTitle, string path)
{
var cell = new AssetPathCell(headerTitle, path);
Cells.Add(cell);
}
public void AddStringValueCell(string headerTitle, string value)
{
var cell = new StringValueCell(headerTitle, value);
Cells.Add(cell);
}
public void AddIntegerValueCell(string headerTitle, long value)
{
var cell = new IntegerValueCell(headerTitle, value);
Cells.Add(cell);
}
public void AddSingleValueCell(string headerTitle, double value)
{
var cell = new SingleValueCell(headerTitle, value);
Cells.Add(cell);
}
#endregion
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b93bf9f1eb7024c44a1c84b299dc9622
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: