mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-14 07:37:06 +08:00
Add jump to top logic for rebuild and refresh
This commit is contained in:
@ -107,6 +107,17 @@ namespace UnityExplorer.UI.Widgets
|
|||||||
public void Rebuild()
|
public void Rebuild()
|
||||||
{
|
{
|
||||||
RecreateCellPool(true, true, null);
|
RecreateCellPool(true, true, null);
|
||||||
|
writingLocked = false;
|
||||||
|
Content.anchoredPosition = Vector2.zero;
|
||||||
|
UpdateSliderHandle(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RefreshAndJumpToTop()
|
||||||
|
{
|
||||||
|
bottomDataIndex = CellPool.Count - 1;
|
||||||
|
RefreshCells(true);
|
||||||
|
Content.anchoredPosition = Vector2.zero;
|
||||||
|
UpdateSliderHandle(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EnableTempCache()
|
public void EnableTempCache()
|
||||||
@ -595,7 +606,7 @@ namespace UnityExplorer.UI.Widgets
|
|||||||
bottomDataIndex = poolStartIndex + CellPool.Count - 1;
|
bottomDataIndex = poolStartIndex + CellPool.Count - 1;
|
||||||
RefreshCells(true, false);
|
RefreshCells(true, false);
|
||||||
|
|
||||||
//UpdateSliderHandle(true);
|
UpdateSliderHandle(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Use <see cref="UIFactory.CreateScrollPool"/></summary>
|
/// <summary>Use <see cref="UIFactory.CreateScrollPool"/></summary>
|
||||||
|
Reference in New Issue
Block a user