merge
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -46,14 +46,8 @@ namespace Studio.HierarchyTree
|
|||||||
public int SetItemData(HierarchyItem item)
|
public int SetItemData(HierarchyItem item)
|
||||||
{
|
{
|
||||||
currentItem = item;
|
currentItem = item;
|
||||||
nameText.text = item.name;
|
|
||||||
|
|
||||||
CustomAssetRenderObject connectObj = item.linkedObject.GetComponent<CustomAssetRenderObject>();
|
|
||||||
if (connectObj != null && string.IsNullOrEmpty(connectObj.code))
|
|
||||||
{
|
|
||||||
nameText.text += $" ({connectObj.code})";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
SetName();
|
||||||
currentItem.isExpanded = item.isExpanded;
|
currentItem.isExpanded = item.isExpanded;
|
||||||
item.onLoadProgress.RemoveAllListeners();
|
item.onLoadProgress.RemoveAllListeners();
|
||||||
item.onLoadProgress.AddListener(OnLoadProgress);
|
item.onLoadProgress.AddListener(OnLoadProgress);
|
||||||
@@ -83,6 +77,7 @@ namespace Studio.HierarchyTree
|
|||||||
public void SetSelected(bool selected)
|
public void SetSelected(bool selected)
|
||||||
{
|
{
|
||||||
isSelected = selected;
|
isSelected = selected;
|
||||||
|
SetName();
|
||||||
if (isSelected)
|
if (isSelected)
|
||||||
{
|
{
|
||||||
backgroundImage.color = selectedColor;
|
backgroundImage.color = selectedColor;
|
||||||
@@ -92,9 +87,19 @@ namespace Studio.HierarchyTree
|
|||||||
backgroundImage.color = Color.clear;
|
backgroundImage.color = Color.clear;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void SetName()
|
||||||
|
{
|
||||||
|
nameText.text = currentItem.name;
|
||||||
|
CustomAssetRenderObject connectObj = currentItem.linkedObject.GetComponent<CustomAssetRenderObject>();
|
||||||
|
if (connectObj != null && !string.IsNullOrEmpty(connectObj.code))
|
||||||
|
{
|
||||||
|
nameText.text += $" ({connectObj.code})";
|
||||||
|
}
|
||||||
|
}
|
||||||
public void SetSelected(List<HierarchyItem> selectedItems)
|
public void SetSelected(List<HierarchyItem> selectedItems)
|
||||||
{
|
{
|
||||||
isSelected = selectedItems.Contains(currentItem);
|
isSelected = selectedItems.Contains(currentItem);
|
||||||
|
SetName();
|
||||||
if (isSelected)
|
if (isSelected)
|
||||||
{
|
{
|
||||||
backgroundImage.color = selectedColor;
|
backgroundImage.color = selectedColor;
|
||||||
|
|||||||
Reference in New Issue
Block a user