@@ -30,7 +30,7 @@ public ObjectSearch(ObjectExplorerPanel parent)
30
30
private string lastCheckedTypeInput ;
31
31
private bool lastTypeCanHaveGO ;
32
32
33
- public ButtonListSource < object > dataHandler ;
33
+ public ButtonListHandler < object , ButtonCell > dataHandler ;
34
34
35
35
private ScrollPool < ButtonCell > resultsScrollPool ;
36
36
private List < object > currentResults = new List < object > ( ) ;
@@ -74,7 +74,7 @@ public void DoSearch()
74
74
75
75
public void Update ( )
76
76
{
77
- if ( lastCheckedTypeInput != desiredTypeInput )
77
+ if ( m_context == SearchContext . UnityObject && lastCheckedTypeInput != desiredTypeInput )
78
78
{
79
79
lastCheckedTypeInput = desiredTypeInput ;
80
80
@@ -101,10 +101,9 @@ private void OnContextDropdownChanged(int value)
101
101
{
102
102
m_context = ( SearchContext ) value ;
103
103
104
- bool shouldShowGoFilters = m_context == SearchContext . UnityObject ;
105
-
106
- sceneFilterRow . SetActive ( shouldShowGoFilters ) ;
107
- childFilterRow . SetActive ( shouldShowGoFilters ) ;
104
+ lastCheckedTypeInput = null ;
105
+ sceneFilterRow . SetActive ( false ) ;
106
+ childFilterRow . SetActive ( false ) ;
108
107
109
108
unityObjectClassRow . SetActive ( m_context == SearchContext . UnityObject ) ;
110
109
}
@@ -244,11 +243,9 @@ public override void ConstructUI(GameObject parent)
244
243
245
244
// RESULTS SCROLL POOL
246
245
247
- dataHandler = new ButtonListSource < object > ( resultsScrollPool , GetEntries , SetCell , ShouldDisplayCell , OnCellClicked ) ;
248
- resultsScrollPool = UIFactory . CreateScrollPool < ButtonCell > ( uiRoot , "ResultsList" , out GameObject scrollObj , out GameObject scrollContent ) ;
249
-
250
- //if (!Pool<ButtonCell>.PrototypeObject)
251
- // Pool<ButtonCell>.PrototypeObject = ButtonCell.CreatePrototypeCell(Pool<ButtonCell>.InactiveHolder).gameObject;
246
+ dataHandler = new ButtonListHandler < object , ButtonCell > ( resultsScrollPool , GetEntries , SetCell , ShouldDisplayCell , OnCellClicked ) ;
247
+ resultsScrollPool = UIFactory . CreateScrollPool < ButtonCell > ( uiRoot , "ResultsList" , out GameObject scrollObj ,
248
+ out GameObject scrollContent ) ;
252
249
253
250
resultsScrollPool . Initialize ( dataHandler ) ;
254
251
UIFactory . SetLayoutElement ( scrollObj , flexibleHeight : 9999 ) ;
0 commit comments