复制粘贴删除
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame;
|
||||
using Michsky.MUIP;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Ichni.Editor
|
||||
@@ -18,13 +20,13 @@ namespace Ichni.Editor
|
||||
public int tabLayer;
|
||||
public bool isSelected;
|
||||
public bool isExpanded;
|
||||
|
||||
|
||||
public RectTransform tabRect;
|
||||
public LayoutElement layoutElement;
|
||||
public RectTransform tabMainRect;
|
||||
public Button tabButton;
|
||||
public Button expandButton;
|
||||
public Button gotoButton;
|
||||
public DoubleCheckButton deleteButton;
|
||||
public TMP_Text tabButtonText;
|
||||
|
||||
public void SetTab(GameElement targetElement, GameElement parentElement)
|
||||
@@ -57,16 +59,21 @@ namespace Ichni.Editor
|
||||
|
||||
for (int i = 1; i <= this.tabLayer; i++)
|
||||
{
|
||||
float lineX = 30 * i - 10;
|
||||
float lineX = 30 * i - 15;
|
||||
Instantiate(indentationLinePrefab, tabRect).GetComponent<RectTransform>().anchoredPosition = new Vector2(lineX, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
float posX = -25 +( 30 * tabLayer);
|
||||
float posX = (30 * tabLayer);
|
||||
tabMainRect.anchoredPosition = new Vector2(posX, tabMainRect.anchoredPosition.y);
|
||||
tabButton.onClick.AddListener(SelectGameElement);
|
||||
expandButton.onClick.AddListener(ExpandOrFold);
|
||||
deleteButton.onConfirm = () =>
|
||||
{
|
||||
connectedGameElement.parentElement.childElementList.Remove(connectedGameElement);
|
||||
connectedGameElement.Delete();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +93,7 @@ namespace Ichni.Editor
|
||||
|
||||
private void SelectGameElement()
|
||||
{
|
||||
EditorManager.instance.operationManager.SelectElement(connectedGameElement);
|
||||
EditorManager.instance.uiManager.inspector.SetInspector(connectedGameElement);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user