mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-04 12:32:23 +08:00
Implement Options panel, some cleanups
This commit is contained in:
@ -18,7 +18,7 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
|
||||
|
||||
public class AutoCompleteModal : UIPanel
|
||||
{
|
||||
public static AutoCompleteModal Instance => UIManager.AutoCompleter;
|
||||
public static AutoCompleteModal Instance => UIManager.GetPanel<AutoCompleteModal>(UIManager.Panels.AutoCompleter);
|
||||
|
||||
public override string Name => "AutoCompleter";
|
||||
public override UIManager.Panels PanelType => UIManager.Panels.AutoCompleter;
|
||||
@ -201,6 +201,6 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
|
||||
// not savable
|
||||
}
|
||||
|
||||
public override string GetSaveData() => null;
|
||||
public override string GetSaveDataFromConfigManager() => null;
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ using UnityExplorer.UI.Widgets;
|
||||
|
||||
namespace UnityExplorer.UI.Widgets
|
||||
{
|
||||
public class ButtonListSource<T> : IPoolDataSource<ButtonCell>
|
||||
public class ButtonListSource<T> : ICellPoolDataSource<ButtonCell>
|
||||
{
|
||||
internal ScrollPool<ButtonCell> ScrollPool;
|
||||
|
||||
|
@ -6,7 +6,7 @@ using UnityEngine;
|
||||
|
||||
namespace UnityExplorer.UI.Widgets
|
||||
{
|
||||
public interface IPoolDataSource<T> where T : ICell
|
||||
public interface ICellPoolDataSource<T> where T : ICell
|
||||
{
|
||||
int ItemCount { get; }
|
||||
|
@ -27,7 +27,7 @@ namespace UnityExplorer.UI.Widgets
|
||||
this.ScrollRect = scrollRect;
|
||||
}
|
||||
|
||||
public IPoolDataSource<T> DataSource { get; set; }
|
||||
public ICellPoolDataSource<T> DataSource { get; set; }
|
||||
|
||||
public readonly List<T> CellPool = new List<T>();
|
||||
|
||||
@ -143,7 +143,7 @@ namespace UnityExplorer.UI.Widgets
|
||||
//private bool Initialized;
|
||||
|
||||
/// <summary>Should be called only once, when the scroll pool is created.</summary>
|
||||
public void Initialize(IPoolDataSource<T> dataSource, Action onHeightChangedListener = null)
|
||||
public void Initialize(ICellPoolDataSource<T> dataSource, Action onHeightChangedListener = null)
|
||||
{
|
||||
this.DataSource = dataSource;
|
||||
HeightCache = new DataHeightCache<T>(this);
|
||||
|
@ -11,7 +11,7 @@ using UnityExplorer.UI.Widgets;
|
||||
|
||||
namespace UnityExplorer.UI.Widgets
|
||||
{
|
||||
public class TransformTree : IPoolDataSource<TransformCell>
|
||||
public class TransformTree : ICellPoolDataSource<TransformCell>
|
||||
{
|
||||
public Func<IEnumerable<GameObject>> GetRootEntriesMethod;
|
||||
|
||||
|
Reference in New Issue
Block a user