Cleanup and fix some small issues with scroll pool

This commit is contained in:
Sinai
2021-04-21 23:07:15 +10:00
parent 0a9639f8a9
commit edbb9a2882
12 changed files with 174 additions and 138 deletions

View File

@ -17,6 +17,8 @@ namespace UnityExplorer.UI.Widgets
public ButtonListSource<T> list;
public GameObject uiRoot;
private RectTransform m_rect;
public RectTransform Rect => m_rect;
public Text buttonText;
public Button button;
@ -24,6 +26,7 @@ namespace UnityExplorer.UI.Widgets
{
this.list = list;
this.uiRoot = uiRoot;
this.m_rect = uiRoot.GetComponent<RectTransform>();
this.buttonText = text;
this.button = button;

View File

@ -96,5 +96,7 @@ namespace UnityExplorer.UI.Widgets
SetICell.Invoke((ButtonCell<T>)cell, index);
}
}
public void DisableCell(ICell cell, int index) => cell.Disable();
}
}