设置页面
This commit is contained in:
BIN
Assets/Scripts/DynamicUI/.DS_Store
vendored
BIN
Assets/Scripts/DynamicUI/.DS_Store
vendored
Binary file not shown.
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame;
|
||||
@@ -11,16 +12,26 @@ namespace Ichni.Editor
|
||||
{
|
||||
public GameObject hierarchyTabPrefab;
|
||||
public RectTransform tabContainer;
|
||||
public Button addFolderButton;
|
||||
public List<HierarchyTab> tabList;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
tabList = new List<HierarchyTab>();
|
||||
addFolderButton.onClick.AddListener(() =>
|
||||
{
|
||||
ElementFolder.GenerateElement("New Folder", Guid.NewGuid(), new List<string>(), true, null);
|
||||
});
|
||||
}
|
||||
|
||||
public HierarchyTab GenerateTab(GameElement targetElement, GameElement parentElement)
|
||||
{
|
||||
HierarchyTab tab = Instantiate(hierarchyTabPrefab, tabContainer).GetComponent<HierarchyTab>();
|
||||
//if(parentElement.connectedTab!=null)tab.transform.SetSiblingIndex(parentElement.connectedTab.transform.GetSiblingIndex());
|
||||
tab.SetTab(targetElement, parentElement);
|
||||
tabList.Add(tab);
|
||||
return tab;
|
||||
}
|
||||
|
||||
public void FindTab(GameElement targetElement, bool findparent = false)
|
||||
{
|
||||
if (targetElement.connectedTab != null)
|
||||
|
||||
Reference in New Issue
Block a user