mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-03 03:52:28 +08:00
Fix transform tree and scroller, add update toggle and refresh button
This commit is contained in:
@ -76,13 +76,11 @@ namespace UnityExplorer.UI.Widgets.InfiniteScroll
|
||||
return;
|
||||
this.ExternallySetting = true;
|
||||
|
||||
ExplorerCore.Log("Slider value changed");
|
||||
|
||||
// Jump to val * count (ie, 0.0 would jump to top, 1.0 would jump to bottom)
|
||||
var index = Math.Floor(val * DataSource.ItemCount);
|
||||
JumpToIndex((int)index);
|
||||
|
||||
this.ExternallySetting = false;
|
||||
//this.ExternallySetting = false;
|
||||
});
|
||||
}
|
||||
|
||||
@ -104,6 +102,8 @@ namespace UnityExplorer.UI.Widgets.InfiniteScroll
|
||||
_prevAnchoredPos = scrollRect.content.anchoredPosition;
|
||||
|
||||
SetSliderFromScrollValue();
|
||||
|
||||
// ExternallySetting = false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -45,6 +45,9 @@ namespace UnityExplorer.UI.Widgets
|
||||
//This is called from the SetCell method in DataSource
|
||||
public void ConfigureCell(CachedTransform cached, int cellIndex)
|
||||
{
|
||||
if (cached == null || !cached.Value)
|
||||
return;
|
||||
|
||||
if (!Enabled)
|
||||
Enable();
|
||||
|
||||
@ -62,14 +65,16 @@ namespace UnityExplorer.UI.Widgets
|
||||
nameLabel.text = $"<color=grey>[{childCount}]</color> {nameLabel.text}";
|
||||
|
||||
expandButton.interactable = true;
|
||||
expandLabel.enabled = true;
|
||||
//expandLabel.enabled = true;
|
||||
expandLabel.text = cached.Expanded ? "▼" : "►";
|
||||
expandLabel.color = cached.Expanded ? new Color(0.5f, 0.5f, 0.5f) : new Color(0.3f, 0.3f, 0.3f);
|
||||
}
|
||||
else
|
||||
{
|
||||
expandButton.interactable = false;
|
||||
expandLabel.enabled = false;
|
||||
expandLabel.text = "▪";
|
||||
expandLabel.color = new Color(0.3f, 0.3f, 0.3f);
|
||||
//expandLabel.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user