Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit 1a01c74

Browse files
committed
Move AutoCompleteModal into Panels folder
1 parent 040fb1f commit 1a01c74

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/UI/Widgets/AutoComplete/AutoCompleteModal.cs renamed to src/UI/Panels/AutoCompleteModal.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ public class AutoCompleteModal : UIPanel
3030
public override int MinWidth => -1;
3131
public override int MinHeight => -1;
3232

33-
public override bool CanDragAndResize => false;
33+
public override bool CanDragAndResize => true;
3434
public override bool ShouldSaveActiveState => false;
3535
public override bool NavButtonWanted => false;
3636

3737
public static ISuggestionProvider CurrentHandler { get; private set; }
3838

39-
public static ButtonListHandler<Suggestion, ButtonCell> dataHandler;
39+
public static ButtonListHandler<Suggestion, ButtonCell> buttonListDataHandler;
4040
public static ScrollPool<ButtonCell> scrollPool;
4141
private static GameObject navigationTipRow;
4242

@@ -82,7 +82,7 @@ public void SetSuggestions(IEnumerable<Suggestion> suggestions)
8282
{
8383
base.UIRoot.SetActive(true);
8484
base.UIRoot.transform.SetAsLastSibling();
85-
dataHandler.RefreshData();
85+
buttonListDataHandler.RefreshData();
8686
scrollPool.Refresh(true, true);
8787
}
8888
}
@@ -303,11 +303,14 @@ protected internal override void DoSetDefaultPosAndAnchors()
303303

304304
public override void ConstructPanelContent()
305305
{
306-
dataHandler = new ButtonListHandler<Suggestion, ButtonCell>(scrollPool, GetEntries, SetCell, ShouldDisplay, OnCellClicked);
306+
// hide the titlebar
307+
this.TitleBar.gameObject.SetActive(false);
308+
309+
buttonListDataHandler = new ButtonListHandler<Suggestion, ButtonCell>(scrollPool, GetEntries, SetCell, ShouldDisplay, OnCellClicked);
307310

308311
scrollPool = UIFactory.CreateScrollPool<ButtonCell>(this.uiContent, "AutoCompleter", out GameObject scrollObj,
309312
out GameObject scrollContent);
310-
scrollPool.Initialize(dataHandler);
313+
scrollPool.Initialize(buttonListDataHandler);
311314
UIFactory.SetLayoutElement(scrollObj, flexibleHeight: 9999);
312315
UIFactory.SetLayoutGroup<VerticalLayoutGroup>(scrollContent, true, false, true, false);
313316

src/UnityExplorer.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@
313313
<Compile Include="UI\Panels\ObjectExplorerPanel.cs" />
314314
<Compile Include="UI\UIManager.cs" />
315315
<Compile Include="UI\Panels\PanelDragger.cs" />
316-
<Compile Include="UI\Widgets\AutoComplete\AutoCompleteModal.cs" />
316+
<Compile Include="UI\Panels\AutoCompleteModal.cs" />
317317
<Compile Include="UI\Widgets\AutoComplete\TypeCompleter.cs" />
318318
<Compile Include="ObjectExplorer\ObjectSearch.cs" />
319319
<Compile Include="ObjectExplorer\SceneExplorer.cs" />

0 commit comments

Comments
 (0)