submodule bug fix & Clip extend

移除submodule重复引用的问题,
Clip现在可以保存任意GameElement,且任意指定物体作为父物体加载
This commit is contained in:
SoulliesOfficial
2025-03-02 02:18:28 -05:00
parent 5d775ae687
commit 188cfba84a
39 changed files with 1276 additions and 193 deletions

View File

@@ -17,14 +17,14 @@ namespace Ichni.Editor
public string parameterName;
public UnityAction ApplyParameters;
public void Initialize(IBaseElement baseElement, string title, string parameterName)
public void Initialize(IBaseElement baseElement, string titleText, string parameterName)
{
transform.localScale = Vector3.zero;
this.connectedBaseElement = baseElement;
this.parameterName = parameterName;
this.title.text = title;
unitList = new List<DynamicUICompositeUnit>();
closeButton.onClick.AddListener(Quit);
InitializeWindow(titleText, ApplyParameters);
StartCoroutine(WindowAnim.ShowPanelOnScale(gameObject));
}

View File

@@ -56,7 +56,7 @@ namespace Ichni.Editor
DynamicUIButton button = Object.Instantiate(EditorManager.instance.basePrefabs.button, container.rect)
.GetComponent<DynamicUIButton>();
button.SetText(buttonText, title != "null");
button.Initialize(baseElement, title, "null");
button.Initialize(baseElement, title, string.Empty);
button.ApplyFunction(function);
container.dynamicUIElements.Add(button);
return button;

View File

@@ -11,24 +11,15 @@ namespace Ichni.Editor
public RectTransform WindowRect { get; set; }
public List<DynamicUIContainer> Containers { get; set; }
public void Initialize(GameElement gameElement, string title)
public void Initialize(GameElement gameElement, string titleText)
{
StartCoroutine(WindowAnim.ShowPanelOnScale(gameObject));
WindowRect = windowRect;
Containers = new List<DynamicUIContainer>();
connectedGameElement = gameElement;
this.title.text = title;
closeButton.onClick.AddListener(Quit);
}
public void Quit()
{
Destroy(gameObject);
//StartCoroutine(WindowAnim.HidePanel(gameObject, true));
InitializeWindow(titleText);
}
}
}