From 8b5e385c28f3818836237da6f34541511c09c6fb Mon Sep 17 00:00:00 2001 From: Sinai Date: Sun, 18 Apr 2021 21:38:09 +1000 Subject: [PATCH] Working on a dynamic-height scroll pool, almost done --- src/UI/Panels/GameObjectInspector.cs | 243 +++++++-- src/UI/Panels/SceneExplorer.cs | 12 +- src/UI/UIFactory.cs | 25 +- .../ScrollPool/Dynamic/DynamicScrollPool.cs | 487 ++++++++++++++++++ .../ScrollPool/Dynamic/IDynamicCell.cs | 17 + .../ScrollPool/Dynamic/IDynamicDataSource.cs | 13 + src/UI/Widgets/ScrollPool/IScrollPool.cs | 12 + src/UI/Widgets/ScrollPool/ScrollPool.cs | 37 +- src/UI/Widgets/SimpleList/SimpleListSource.cs | 29 +- src/UnityExplorer.csproj | 12 +- 10 files changed, 808 insertions(+), 79 deletions(-) create mode 100644 src/UI/Widgets/ScrollPool/Dynamic/DynamicScrollPool.cs create mode 100644 src/UI/Widgets/ScrollPool/Dynamic/IDynamicCell.cs create mode 100644 src/UI/Widgets/ScrollPool/Dynamic/IDynamicDataSource.cs create mode 100644 src/UI/Widgets/ScrollPool/IScrollPool.cs diff --git a/src/UI/Panels/GameObjectInspector.cs b/src/UI/Panels/GameObjectInspector.cs index 23e7a2f..317b1ee 100644 --- a/src/UI/Panels/GameObjectInspector.cs +++ b/src/UI/Panels/GameObjectInspector.cs @@ -17,7 +17,7 @@ namespace UnityExplorer.UI.Panels { public override string Name => "GameObject Inspector"; - public SimpleListSource ComponentList; + //public SimpleListSource ComponentList; public override void Update() { @@ -33,28 +33,19 @@ namespace UnityExplorer.UI.Panels }; } - public SimpleCell CreateCell(RectTransform rect) - { - var button = rect.GetComponentInChildren