mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-13 23:36:35 +08:00
Misc cleanups and adjustments
This commit is contained in:
@ -31,7 +31,7 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
|
||||
|
||||
public static ISuggestionProvider CurrentHandler { get; private set; }
|
||||
|
||||
public static ButtonListSource<Suggestion> dataHandler;
|
||||
public static ButtonListHandler<Suggestion, ButtonCell> dataHandler;
|
||||
public static ScrollPool<ButtonCell> scrollPool;
|
||||
private static GameObject navigationTipRow;
|
||||
|
||||
@ -299,9 +299,10 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
|
||||
|
||||
public override void ConstructPanelContent()
|
||||
{
|
||||
dataHandler = new ButtonListSource<Suggestion>(scrollPool, GetEntries, SetCell, ShouldDisplay, OnCellClicked);
|
||||
dataHandler = new ButtonListHandler<Suggestion, ButtonCell>(scrollPool, GetEntries, SetCell, ShouldDisplay, OnCellClicked);
|
||||
|
||||
scrollPool = UIFactory.CreateScrollPool<ButtonCell>(this.content, "AutoCompleter", out GameObject scrollObj, out GameObject scrollContent);
|
||||
scrollPool = UIFactory.CreateScrollPool<ButtonCell>(this.content, "AutoCompleter", out GameObject scrollObj,
|
||||
out GameObject scrollContent);
|
||||
scrollPool.Initialize(dataHandler);
|
||||
UIFactory.SetLayoutElement(scrollObj, flexibleHeight: 9999);
|
||||
UIFactory.SetLayoutGroup<VerticalLayoutGroup>(scrollContent, true, false, true, false);
|
||||
|
@ -39,9 +39,9 @@ namespace UnityExplorer.UI.Widgets
|
||||
|
||||
#endregion
|
||||
|
||||
public GameObject CreateContent(GameObject parent)
|
||||
public virtual GameObject CreateContent(GameObject parent)
|
||||
{
|
||||
UIRoot = UIFactory.CreateHorizontalGroup(parent, "ButtonCell", true, true, true, true, 2, default,
|
||||
UIRoot = UIFactory.CreateHorizontalGroup(parent, "ButtonCell", true, false, true, true, 2, default,
|
||||
new Color(0.11f, 0.11f, 0.11f), TextAnchor.MiddleCenter);
|
||||
Rect = UIRoot.GetComponent<RectTransform>();
|
||||
Rect.anchorMin = new Vector2(0, 1);
|
||||
|
Reference in New Issue
Block a user