diff --git a/Assets/Scripts/DynamicUI/DynamicUIElements/Simple/DynamicUIBaseColorPicker.cs b/Assets/Scripts/DynamicUI/DynamicUIElements/Simple/DynamicUIBaseColorPicker.cs index 930fc556..b8eb8bac 100644 --- a/Assets/Scripts/DynamicUI/DynamicUIElements/Simple/DynamicUIBaseColorPicker.cs +++ b/Assets/Scripts/DynamicUI/DynamicUIElements/Simple/DynamicUIBaseColorPicker.cs @@ -60,7 +60,7 @@ namespace Ichni.Editor ApplyParameters(); } - public void AddListenerFunction(UnityAction action) + public override void AddListenerFunction(UnityAction action) { inputFieldBaseR.onEndEdit.AddListener(_ => action()); inputFieldBaseG.onEndEdit.AddListener(_ => action()); diff --git a/Assets/Scripts/DynamicUI/DynamicUIElements/Simple/DynamicUIButton.cs b/Assets/Scripts/DynamicUI/DynamicUIElements/Simple/DynamicUIButton.cs index 2725a51f..1f16f13e 100644 --- a/Assets/Scripts/DynamicUI/DynamicUIElements/Simple/DynamicUIButton.cs +++ b/Assets/Scripts/DynamicUI/DynamicUIElements/Simple/DynamicUIButton.cs @@ -13,10 +13,10 @@ namespace Ichni.Editor public Button button; public TMP_Text buttonText; - public void SetText(string buttonText, bool hasTitle) + public void SetText(string buttonText, bool showTitle) { this.buttonText.text = buttonText; - if(!hasTitle) title.gameObject.SetActive(false); + if(!showTitle) title.gameObject.SetActive(false); } public void ApplyFunction(UnityAction function) @@ -27,5 +27,10 @@ namespace Ichni.Editor button.onClick.AddListener(connectedBaseElement.Refresh); } } + + public override void AddListenerFunction(UnityAction action) + { + throw new System.NotImplementedException(); + } } } \ No newline at end of file diff --git a/Assets/Scripts/DynamicUI/DynamicUIElements/Simple/DynamicUIElement.cs b/Assets/Scripts/DynamicUI/DynamicUIElements/Simple/DynamicUIElement.cs index 6c746c98..d152b143 100644 --- a/Assets/Scripts/DynamicUI/DynamicUIElements/Simple/DynamicUIElement.cs +++ b/Assets/Scripts/DynamicUI/DynamicUIElements/Simple/DynamicUIElement.cs @@ -34,6 +34,13 @@ namespace Ichni.Editor } } + public void Mark(IHaveInspection inspection, string mark) + { + inspection.MarkedElements.Add(mark, this); + } + + public abstract void AddListenerFunction(UnityAction action); + public virtual void DeviverSet(int DeviveNum){ float o=2f/DeviveNum;//因为所有的单UI都是根据2栏来的 Button[] childb=GetComponentsInChildren