From a2c9e72c34398ae7e5f5d35e0e7ac5629f0da540 Mon Sep 17 00:00:00 2001 From: ls9512 <598914653@qq.com> Date: Wed, 27 Mar 2024 17:47:42 +0800 Subject: [PATCH] Modify Add component menu path --- .github/README.md | 2 +- .github/README_CN.md | 2 +- Extension/TextMeshPro/Script/TMPTextBinder.cs | 2 +- Extension/TextMeshPro/Script/TMPTextFormatValueBinder.cs | 2 +- Runtime/Script/Component/PropertyBinder.cs | 2 +- Runtime/Script/Component/TypeBinder.cs | 2 +- Runtime/Script/Component/UI/CanvasGroupBinder.cs | 2 +- Runtime/Script/Component/UI/ColorBinder.cs | 2 +- Runtime/Script/Component/UI/DropdownBinder.cs | 2 +- Runtime/Script/Component/UI/DropdownListBinder.cs | 2 +- Runtime/Script/Component/UI/ImageBinder.cs | 2 +- Runtime/Script/Component/UI/ImageFillAmountBinder.cs | 2 +- Runtime/Script/Component/UI/InputFieldBinder.cs | 2 +- Runtime/Script/Component/UI/RawImageBinder.cs | 2 +- Runtime/Script/Component/UI/ScrollbarBinder.cs | 2 +- Runtime/Script/Component/UI/SliderBinder.cs | 2 +- Runtime/Script/Component/UI/TextBinder.cs | 2 +- Runtime/Script/Component/UI/TextFontSizeBinder.cs | 2 +- Runtime/Script/Component/UI/TextFormatValueBinder.cs | 2 +- Runtime/Script/Component/UI/ToggleBinder.cs | 2 +- Runtime/Script/UBind.cs | 5 +++-- 21 files changed, 23 insertions(+), 22 deletions(-) diff --git a/.github/README.md b/.github/README.md index 396fdc6..df6d326 100644 --- a/.github/README.md +++ b/.github/README.md @@ -14,7 +14,7 @@ ![last](https://img.shields.io/github/last-commit/ls9512/UBind) [![996.icu](https://img.shields.io/badge/link-996.icu-red.svg)](https://996.icu) -[![issue](https://img.shields.io/github/issues/ls9512/UTween)](https://github.com/ls9512/UBind/issues) +[![issue](https://img.shields.io/github/issues/ls9512/UBind)](https://github.com/ls9512/UBind/issues) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/ls9512/UBind/pulls) [![Updates](https://img.shields.io/badge/Platform-%20iOS%20%7C%20OS%20X%20%7C%20Android%20%7C%20Windows%20%7C%20Linux%20-brightgreen.svg)](https://github.com/ls9512/UBind) diff --git a/.github/README_CN.md b/.github/README_CN.md index e33e836..d4cddb4 100644 --- a/.github/README_CN.md +++ b/.github/README_CN.md @@ -14,7 +14,7 @@ ![last](https://img.shields.io/github/last-commit/ls9512/UBind) [![996.icu](https://img.shields.io/badge/link-996.icu-red.svg)](https://996.icu) -[![issue](https://img.shields.io/github/issues/ls9512/UTween)](https://github.com/ls9512/UBind/issues) +[![issue](https://img.shields.io/github/issues/ls9512/UBind)](https://github.com/ls9512/UBind/issues) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/ls9512/UBind/pulls) [![Updates](https://img.shields.io/badge/Platform-%20iOS%20%7C%20OS%20X%20%7C%20Android%20%7C%20Windows%20%7C%20Linux%20-brightgreen.svg)](https://github.com/ls9512/UBind) diff --git a/Extension/TextMeshPro/Script/TMPTextBinder.cs b/Extension/TextMeshPro/Script/TMPTextBinder.cs index 5b292a1..40f3c50 100644 --- a/Extension/TextMeshPro/Script/TMPTextBinder.cs +++ b/Extension/TextMeshPro/Script/TMPTextBinder.cs @@ -4,7 +4,7 @@ namespace Aya.DataBinding { - [AddComponentMenu("Data Binding/TMP Text Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/TMP Text Binder")] public class TMPTextBinder : ComponentBinder { public override bool NeedUpdate => true; diff --git a/Extension/TextMeshPro/Script/TMPTextFormatValueBinder.cs b/Extension/TextMeshPro/Script/TMPTextFormatValueBinder.cs index 48fffe4..5d88ced 100644 --- a/Extension/TextMeshPro/Script/TMPTextFormatValueBinder.cs +++ b/Extension/TextMeshPro/Script/TMPTextFormatValueBinder.cs @@ -6,7 +6,7 @@ namespace Aya.DataBinding { - [AddComponentMenu("Data Binding/TMP Text Format Value Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/TMP Text Format Value Binder")] public class TMPTextFormatValueBinder : ComponentBinder { public override bool NeedUpdate => true; diff --git a/Runtime/Script/Component/PropertyBinder.cs b/Runtime/Script/Component/PropertyBinder.cs index e9e9b48..4af4792 100644 --- a/Runtime/Script/Component/PropertyBinder.cs +++ b/Runtime/Script/Component/PropertyBinder.cs @@ -2,7 +2,7 @@ namespace Aya.DataBinding { - [AddComponentMenu("Data Binding/Property Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/Property Binder")] public class PropertyBinder : ComponentBinder> { public override bool NeedUpdate => true; diff --git a/Runtime/Script/Component/TypeBinder.cs b/Runtime/Script/Component/TypeBinder.cs index 1f0f1be..1f10aba 100644 --- a/Runtime/Script/Component/TypeBinder.cs +++ b/Runtime/Script/Component/TypeBinder.cs @@ -12,7 +12,7 @@ public class TypeBindMap public string TargetProperty; } - [AddComponentMenu("Data Binding/Type Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/Type Binder")] public class TypeBinder : MonoBehaviour { public string Container = DataContainer.Default; diff --git a/Runtime/Script/Component/UI/CanvasGroupBinder.cs b/Runtime/Script/Component/UI/CanvasGroupBinder.cs index 21ff204..1e5fc98 100644 --- a/Runtime/Script/Component/UI/CanvasGroupBinder.cs +++ b/Runtime/Script/Component/UI/CanvasGroupBinder.cs @@ -2,7 +2,7 @@ namespace Aya.DataBinding { - [AddComponentMenu("Data Binding/CanvasGroup Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/CanvasGroup Binder")] public class CanvasGroupBinder : ComponentBinder { public override bool NeedUpdate => true; diff --git a/Runtime/Script/Component/UI/ColorBinder.cs b/Runtime/Script/Component/UI/ColorBinder.cs index 3e78936..634fdf2 100644 --- a/Runtime/Script/Component/UI/ColorBinder.cs +++ b/Runtime/Script/Component/UI/ColorBinder.cs @@ -3,7 +3,7 @@ namespace Aya.DataBinding { - [AddComponentMenu("Data Binding/Color Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/Color Binder")] public class ColorBinder : ComponentBinder { public override bool NeedUpdate => true; diff --git a/Runtime/Script/Component/UI/DropdownBinder.cs b/Runtime/Script/Component/UI/DropdownBinder.cs index 799b630..3dbf147 100644 --- a/Runtime/Script/Component/UI/DropdownBinder.cs +++ b/Runtime/Script/Component/UI/DropdownBinder.cs @@ -3,7 +3,7 @@ namespace Aya.DataBinding { - [AddComponentMenu("Data Binding/Dropdown Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/Dropdown Binder")] public class DropdownBinder : ComponentBinder { diff --git a/Runtime/Script/Component/UI/DropdownListBinder.cs b/Runtime/Script/Component/UI/DropdownListBinder.cs index 74d138e..22619cd 100644 --- a/Runtime/Script/Component/UI/DropdownListBinder.cs +++ b/Runtime/Script/Component/UI/DropdownListBinder.cs @@ -4,7 +4,7 @@ namespace Aya.DataBinding { - [AddComponentMenu("Data Binding/Dropdown List Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/Dropdown List Binder")] public class DropdownListBinder : ComponentBinder, RuntimeDropdownListBinder> { public override bool NeedUpdate => true; diff --git a/Runtime/Script/Component/UI/ImageBinder.cs b/Runtime/Script/Component/UI/ImageBinder.cs index 6fce4b7..ac4062e 100644 --- a/Runtime/Script/Component/UI/ImageBinder.cs +++ b/Runtime/Script/Component/UI/ImageBinder.cs @@ -3,7 +3,7 @@ namespace Aya.DataBinding { - [AddComponentMenu("Data Binding/Image Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/Image Binder")] public class ImageBinder : ComponentBinder { public override bool NeedUpdate => true; diff --git a/Runtime/Script/Component/UI/ImageFillAmountBinder.cs b/Runtime/Script/Component/UI/ImageFillAmountBinder.cs index 951f960..9ad4ba0 100644 --- a/Runtime/Script/Component/UI/ImageFillAmountBinder.cs +++ b/Runtime/Script/Component/UI/ImageFillAmountBinder.cs @@ -3,7 +3,7 @@ namespace Aya.DataBinding { - [AddComponentMenu("Data Binding/Image FillAmount Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/Image FillAmount Binder")] public class ImageFillAmountBinder : ComponentBinder { public override bool NeedUpdate => true; diff --git a/Runtime/Script/Component/UI/InputFieldBinder.cs b/Runtime/Script/Component/UI/InputFieldBinder.cs index 7588f20..c4756ce 100644 --- a/Runtime/Script/Component/UI/InputFieldBinder.cs +++ b/Runtime/Script/Component/UI/InputFieldBinder.cs @@ -3,7 +3,7 @@ namespace Aya.DataBinding { - [AddComponentMenu("Data Binding/InputField Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/InputField Binder")] public class InputFieldBinder : ComponentBinder { diff --git a/Runtime/Script/Component/UI/RawImageBinder.cs b/Runtime/Script/Component/UI/RawImageBinder.cs index 857c76e..b90bfbf 100644 --- a/Runtime/Script/Component/UI/RawImageBinder.cs +++ b/Runtime/Script/Component/UI/RawImageBinder.cs @@ -3,7 +3,7 @@ namespace Aya.DataBinding { - [AddComponentMenu("Data Binding/RawImage Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/RawImage Binder")] public class RawImageBinder : ComponentBinder { public override bool NeedUpdate => true; diff --git a/Runtime/Script/Component/UI/ScrollbarBinder.cs b/Runtime/Script/Component/UI/ScrollbarBinder.cs index e949e5b..37651bd 100644 --- a/Runtime/Script/Component/UI/ScrollbarBinder.cs +++ b/Runtime/Script/Component/UI/ScrollbarBinder.cs @@ -3,7 +3,7 @@ namespace Aya.DataBinding { - [AddComponentMenu("Data Binding/Scrollbar Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/Scrollbar Binder")] public class ScrollbarBinder : ComponentBinder { diff --git a/Runtime/Script/Component/UI/SliderBinder.cs b/Runtime/Script/Component/UI/SliderBinder.cs index 7906fa0..527400b 100644 --- a/Runtime/Script/Component/UI/SliderBinder.cs +++ b/Runtime/Script/Component/UI/SliderBinder.cs @@ -3,7 +3,7 @@ namespace Aya.DataBinding { - [AddComponentMenu("Data Binding/Slider Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/Slider Binder")] public class SliderBinder : ComponentBinder { diff --git a/Runtime/Script/Component/UI/TextBinder.cs b/Runtime/Script/Component/UI/TextBinder.cs index 927ae3c..6e35aa4 100644 --- a/Runtime/Script/Component/UI/TextBinder.cs +++ b/Runtime/Script/Component/UI/TextBinder.cs @@ -3,7 +3,7 @@ namespace Aya.DataBinding { - [AddComponentMenu("Data Binding/Text Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/Text Binder")] public class TextBinder : ComponentBinder { public override bool NeedUpdate => true; diff --git a/Runtime/Script/Component/UI/TextFontSizeBinder.cs b/Runtime/Script/Component/UI/TextFontSizeBinder.cs index 35c1939..38e9af9 100644 --- a/Runtime/Script/Component/UI/TextFontSizeBinder.cs +++ b/Runtime/Script/Component/UI/TextFontSizeBinder.cs @@ -3,7 +3,7 @@ namespace Aya.DataBinding { - [AddComponentMenu("Data Binding/Text FontSize Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/Text FontSize Binder")] public class TextFontSizeBinder : ComponentBinder { public override bool NeedUpdate => true; diff --git a/Runtime/Script/Component/UI/TextFormatValueBinder.cs b/Runtime/Script/Component/UI/TextFormatValueBinder.cs index 9fc41f3..b5f24c8 100644 --- a/Runtime/Script/Component/UI/TextFormatValueBinder.cs +++ b/Runtime/Script/Component/UI/TextFormatValueBinder.cs @@ -6,7 +6,7 @@ namespace Aya.DataBinding { - [AddComponentMenu("Data Binding/Text Format Value Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/Text Format Value Binder")] public class TextFormatValueBinder : ComponentBinder { public override bool NeedUpdate => true; diff --git a/Runtime/Script/Component/UI/ToggleBinder.cs b/Runtime/Script/Component/UI/ToggleBinder.cs index a442c2e..0a9f239 100644 --- a/Runtime/Script/Component/UI/ToggleBinder.cs +++ b/Runtime/Script/Component/UI/ToggleBinder.cs @@ -3,7 +3,7 @@ namespace Aya.DataBinding { - [AddComponentMenu("Data Binding/Toggle Binder")] + [AddComponentMenu(UBind.AddComponentMenuPath + "/Toggle Binder")] public class ToggleBinder : ComponentBinder { diff --git a/Runtime/Script/UBind.cs b/Runtime/Script/UBind.cs index 697ca23..3f45fb8 100644 --- a/Runtime/Script/UBind.cs +++ b/Runtime/Script/UBind.cs @@ -1,11 +1,12 @@ -using Aya.Sample; -using System; +using System; using System.Reflection; namespace Aya.DataBinding { public static class UBind { + public const string AddComponentMenuPath = nameof(UBind); + #region Converter public static void RegisterConverter(Type sourceType, Type targetType, DataConverter dataConverter)