From 912e2c28a3e3b5637628d28c636c2ba8de403dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E5=86=A0=E5=B3=B0?= Date: Mon, 20 Jan 2025 19:12:23 +0800 Subject: [PATCH] update UIElements --- .../TableView/DefaultCells/AssetPathCell.cs | 2 +- .../DefaultCells/BooleanValueCell.cs | 6 +++--- .../DefaultCells/IntegerValueCell.cs | 6 +++--- .../TableView/DefaultCells/SingleValueCell.cs | 6 +++--- .../TableView/DefaultCells/StringValueCell.cs | 6 +++--- .../DefaultTableData/DefaultTableData.cs | 20 +++++++++---------- .../SearchSystem/DefaultSearchSystem.cs | 12 +++++------ .../TableView/SearchSystem/SearchKeyword.cs | 2 +- 8 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/AssetPathCell.cs b/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/AssetPathCell.cs index 0c23b737..61c0ff1f 100644 --- a/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/AssetPathCell.cs +++ b/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/AssetPathCell.cs @@ -5,7 +5,7 @@ namespace YooAsset.Editor { public class AssetPathCell : StringValueCell { - public AssetPathCell(string headerTitle, object cellValue) : base(headerTitle, cellValue) + public AssetPathCell(string searchTag, object cellValue) : base(searchTag, cellValue) { } diff --git a/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/BooleanValueCell.cs b/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/BooleanValueCell.cs index 2ccf0ac0..ee7598c4 100644 --- a/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/BooleanValueCell.cs +++ b/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/BooleanValueCell.cs @@ -6,7 +6,7 @@ namespace YooAsset.Editor public class BooleanValueCell : ITableCell, IComparable { public object CellValue { set; get; } - public string HeaderTitle { private set; get; } + public string SearchTag { private set; get; } public bool BooleanValue { get @@ -15,9 +15,9 @@ namespace YooAsset.Editor } } - public BooleanValueCell(string headerTitle, object cellValue) + public BooleanValueCell(string searchTag, object cellValue) { - HeaderTitle = headerTitle; + SearchTag = searchTag; CellValue = cellValue; } public object GetDisplayObject() diff --git a/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/IntegerValueCell.cs b/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/IntegerValueCell.cs index 72565aa6..bb760b4c 100644 --- a/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/IntegerValueCell.cs +++ b/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/IntegerValueCell.cs @@ -6,7 +6,7 @@ namespace YooAsset.Editor public class IntegerValueCell : ITableCell, IComparable { public object CellValue { set; get; } - public string HeaderTitle { private set; get; } + public string SearchTag { private set; get; } public long IntegerValue { get @@ -15,9 +15,9 @@ namespace YooAsset.Editor } } - public IntegerValueCell(string headerTitle, object cellValue) + public IntegerValueCell(string searchTag, object cellValue) { - HeaderTitle = headerTitle; + SearchTag = searchTag; CellValue = cellValue; } public object GetDisplayObject() diff --git a/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/SingleValueCell.cs b/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/SingleValueCell.cs index 222e2cc9..e80f2df6 100644 --- a/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/SingleValueCell.cs +++ b/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/SingleValueCell.cs @@ -6,7 +6,7 @@ namespace YooAsset.Editor public class SingleValueCell : ITableCell, IComparable { public object CellValue { set; get; } - public string HeaderTitle { private set; get; } + public string SearchTag { private set; get; } public double SingleValue { get @@ -15,9 +15,9 @@ namespace YooAsset.Editor } } - public SingleValueCell(string headerTitle, object cellValue) + public SingleValueCell(string searchTag, object cellValue) { - HeaderTitle = headerTitle; + SearchTag = searchTag; CellValue = cellValue; } public object GetDisplayObject() diff --git a/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/StringValueCell.cs b/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/StringValueCell.cs index bb4dfc94..0ab0d0e9 100644 --- a/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/StringValueCell.cs +++ b/Assets/YooAsset/Editor/UIElements/TableView/DefaultCells/StringValueCell.cs @@ -6,7 +6,7 @@ namespace YooAsset.Editor public class StringValueCell : ITableCell, IComparable { public object CellValue { set; get; } - public string HeaderTitle { private set; get; } + public string SearchTag { private set; get; } public string StringValue { get @@ -15,9 +15,9 @@ namespace YooAsset.Editor } } - public StringValueCell(string headerTitle, object cellValue) + public StringValueCell(string searchTag, object cellValue) { - HeaderTitle = headerTitle; + SearchTag = searchTag; CellValue = cellValue; } public object GetDisplayObject() diff --git a/Assets/YooAsset/Editor/UIElements/TableView/DefaultTableData/DefaultTableData.cs b/Assets/YooAsset/Editor/UIElements/TableView/DefaultTableData/DefaultTableData.cs index c3f747c0..cdb0554f 100644 --- a/Assets/YooAsset/Editor/UIElements/TableView/DefaultTableData/DefaultTableData.cs +++ b/Assets/YooAsset/Editor/UIElements/TableView/DefaultTableData/DefaultTableData.cs @@ -24,29 +24,29 @@ namespace YooAsset.Editor var cell = new ButtonCell(); Cells.Add(cell); } - public void AddAssetPathCell(string headerTitle, string path) + public void AddAssetPathCell(string searchTag, string path) { - var cell = new AssetPathCell(headerTitle, path); + var cell = new AssetPathCell(searchTag, path); Cells.Add(cell); } - public void AddStringValueCell(string headerTitle, string value) + public void AddStringValueCell(string searchTag, string value) { - var cell = new StringValueCell(headerTitle, value); + var cell = new StringValueCell(searchTag, value); Cells.Add(cell); } - public void AddLongValueCell(string headerTitle, long value) + public void AddLongValueCell(string searchTag, long value) { - var cell = new IntegerValueCell(headerTitle, value); + var cell = new IntegerValueCell(searchTag, value); Cells.Add(cell); } - public void AddDoubleValueCell(string headerTitle, double value) + public void AddDoubleValueCell(string searchTag, double value) { - var cell = new SingleValueCell(headerTitle, value); + var cell = new SingleValueCell(searchTag, value); Cells.Add(cell); } - public void AddBoolValueCell(string headerTitle, bool value) + public void AddBoolValueCell(string searchTag, bool value) { - var cell = new BooleanValueCell(headerTitle, value); + var cell = new BooleanValueCell(searchTag, value); Cells.Add(cell); } #endregion diff --git a/Assets/YooAsset/Editor/UIElements/TableView/SearchSystem/DefaultSearchSystem.cs b/Assets/YooAsset/Editor/UIElements/TableView/SearchSystem/DefaultSearchSystem.cs index 1f3c1148..0201a648 100644 --- a/Assets/YooAsset/Editor/UIElements/TableView/SearchSystem/DefaultSearchSystem.cs +++ b/Assets/YooAsset/Editor/UIElements/TableView/SearchSystem/DefaultSearchSystem.cs @@ -100,14 +100,14 @@ namespace YooAsset.Editor continue; var cmd = new SearchKeyword(); - cmd.HeaderTitle = splits[0]; + cmd.SearchTag = splits[0]; cmd.Keyword = splits[1]; results.Add(cmd); } else { var cmd = new SearchKeyword(); - cmd.HeaderTitle = string.Empty; + cmd.SearchTag = string.Empty; cmd.Keyword = command; results.Add(cmd); } @@ -171,9 +171,9 @@ namespace YooAsset.Editor var searchKeywordCmd = cmd as SearchKeyword; if (tableCell is StringValueCell stringValueCell) { - if (string.IsNullOrEmpty(searchKeywordCmd.HeaderTitle) == false) + if (string.IsNullOrEmpty(searchKeywordCmd.SearchTag) == false) { - if (searchKeywordCmd.HeaderTitle == stringValueCell.HeaderTitle) + if (searchKeywordCmd.SearchTag == stringValueCell.SearchTag) { if (searchKeywordCmd.CompareTo(stringValueCell.StringValue)) return true; @@ -204,7 +204,7 @@ namespace YooAsset.Editor var searchCompareCmd = cmd as SearchCompare; if (tableCell is IntegerValueCell integerValueCell) { - if (searchCompareCmd.HeaderTitle == integerValueCell.HeaderTitle) + if (searchCompareCmd.HeaderTitle == integerValueCell.SearchTag) { if (searchCompareCmd.CompareTo(integerValueCell.IntegerValue)) return true; @@ -212,7 +212,7 @@ namespace YooAsset.Editor } else if (tableCell is SingleValueCell singleValueCell) { - if (searchCompareCmd.HeaderTitle == singleValueCell.HeaderTitle) + if (searchCompareCmd.HeaderTitle == singleValueCell.SearchTag) { if (searchCompareCmd.CompareTo(singleValueCell.SingleValue)) return true; diff --git a/Assets/YooAsset/Editor/UIElements/TableView/SearchSystem/SearchKeyword.cs b/Assets/YooAsset/Editor/UIElements/TableView/SearchSystem/SearchKeyword.cs index 2fefc758..2821b1af 100644 --- a/Assets/YooAsset/Editor/UIElements/TableView/SearchSystem/SearchKeyword.cs +++ b/Assets/YooAsset/Editor/UIElements/TableView/SearchSystem/SearchKeyword.cs @@ -7,7 +7,7 @@ namespace YooAsset.Editor /// public class SearchKeyword : ISearchCommand { - public string HeaderTitle; + public string SearchTag; public string Keyword; public bool CompareTo(string value)