/**************************************************** 文件:TableColumn.cs 作者:陶长春 邮箱:376248129@qq.com 日期:2024年12月12日 8:06:25 UnityVersion: 2021.3.13f1 功能:表格列数据处理 *****************************************************/ using System.Collections; using UnityEngine; using System.Collections.Generic; using UnityEditor.IMGUI.Controls; namespace TFramework { public class TableColumn : MultiColumnHeaderState.Column where T : class, new() { /// /// 绘制列元素的方法 /// public DrawCellMethod DrawCell; /// /// 对比列元素的方法 /// public CompareMethod Compare; } /// /// 绘制列元素的方法 /// /// 数据类型 /// 绘制区域 /// 绘制数据 /// 在表格中的行索引 /// 是否选中 /// 是否焦点 public delegate void DrawCellMethod(Rect cellRect, T data, int rowIndex, bool isSelected, bool isFocused); /// /// 对比列元素的方法 /// /// 数据类型 /// 数据1 /// 数据2 /// 排序号 public delegate int CompareMethod(T data1, T data2); }