This commit is contained in:
陈思海 2025-07-28 20:52:34 +08:00
parent 386e83e2dc
commit 8b10f98116
6 changed files with 9 additions and 14 deletions

View File

@ -5,7 +5,7 @@ using UnityEngine;
namespace AlicizaX.UI.Extension.Editor namespace AlicizaX.UI.Extension.Editor
{ {
public static class ExtensionHelper internal static class ExtensionHelper
{ {
public static void PreviewAudioClip(AudioClip clip) public static void PreviewAudioClip(AudioClip clip)
{ {

View File

@ -4,7 +4,7 @@ using UnityEngine;
namespace AlicizaX.UI.Extension.Editor namespace AlicizaX.UI.Extension.Editor
{ {
public class GUILayoutHelper internal class GUILayoutHelper
{ {
public static void DrawProperty(SerializedProperty property, GUISkin skin, string content) public static void DrawProperty(SerializedProperty property, GUISkin skin, string content)
{ {

View File

@ -2,7 +2,7 @@ using UnityEditor;
namespace UnityEngine.UI namespace UnityEngine.UI
{ {
public static class UIEffectWrapDrawer internal static class UIEffectWrapDrawer
{ {
static string LabelStr; static string LabelStr;
static string ShadowStr; static string ShadowStr;

View File

@ -6,7 +6,7 @@ using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
public class UXUIEditor : Editor internal class UXUIEditor : Editor
{ {
static object InvokeMethod(Type type, string methodName, object[] parameters = null) static object InvokeMethod(Type type, string methodName, object[] parameters = null)
{ {

View File

@ -11,7 +11,7 @@ namespace UnityEngine.UI
{ {
[CustomEditor(typeof(UXImage), true)] [CustomEditor(typeof(UXImage), true)]
[CanEditMultipleObjects] [CanEditMultipleObjects]
public class UXImageEditor : Editor internal class UXImageEditor : Editor
{ {
private GameObject go; private GameObject go;
@ -185,8 +185,6 @@ namespace UnityEngine.UI
m_ShowSliced.valueChanged.AddListener(Repaint); m_ShowSliced.valueChanged.AddListener(Repaint);
m_ShowTiled.valueChanged.AddListener(Repaint); m_ShowTiled.valueChanged.AddListener(Repaint);
m_ShowFilled.valueChanged.AddListener(Repaint); m_ShowFilled.valueChanged.AddListener(Repaint);
} }
private void OnDisable() private void OnDisable()
@ -197,7 +195,6 @@ namespace UnityEngine.UI
} }
m_ShowType.valueChanged.RemoveListener(Repaint); m_ShowType.valueChanged.RemoveListener(Repaint);
m_ShowNativeSize.valueChanged.RemoveListener(Repaint); m_ShowNativeSize.valueChanged.RemoveListener(Repaint);
m_ShowSlicedOrTiled.valueChanged.RemoveListener(Repaint); m_ShowSlicedOrTiled.valueChanged.RemoveListener(Repaint);
@ -288,12 +285,11 @@ namespace UnityEngine.UI
protected void AppearanceControlsGUI() protected void AppearanceControlsGUI()
{ {
EditorGUI.BeginChangeCheck(); EditorGUI.BeginChangeCheck();
string[] labels = {"Solid_Color", "Gradient_Color" }; string[] labels = { "Solid_Color", "Gradient_Color" };
var type = (UXImage.ColorType)EnumPopupLayoutEx("ColorType", typeof(UXImage.ColorType), m_ColorType.intValue, labels); var type = (UXImage.ColorType)EnumPopupLayoutEx("ColorType", typeof(UXImage.ColorType), m_ColorType.intValue, labels);
// EditorGUILayout.EnumPopup(EditorLocalization.GetLocalization("UXImage", "m_ColorType"), (UXImage.ColorType)m_ColorType.intValue); // EditorGUILayout.EnumPopup(EditorLocalization.GetLocalization("UXImage", "m_ColorType"), (UXImage.ColorType)m_ColorType.intValue);
if (EditorGUI.EndChangeCheck()) if (EditorGUI.EndChangeCheck())
{ {
m_ColorType.intValue = (int)type; m_ColorType.intValue = (int)type;
if ((int)type == 1 && m_Type.intValue != 0) if ((int)type == 1 && m_Type.intValue != 0)
{ {
@ -334,12 +330,11 @@ namespace UnityEngine.UI
else if (type == UXImage.ColorType.Gradient_Color) else if (type == UXImage.ColorType.Gradient_Color)
{ {
EditorGUI.BeginChangeCheck(); EditorGUI.BeginChangeCheck();
string[] labels2 = {"Vertical", "Horizontal"}; string[] labels2 = { "Vertical", "Horizontal" };
var direction = (UXImage.GradientDirection)EnumPopupLayoutEx("m_Direction", typeof(UXImage.GradientDirection), m_Direction.intValue, labels2); var direction = (UXImage.GradientDirection)EnumPopupLayoutEx("m_Direction", typeof(UXImage.GradientDirection), m_Direction.intValue, labels2);
if (EditorGUI.EndChangeCheck()) if (EditorGUI.EndChangeCheck())
{ {
m_Direction.intValue = (int)direction; m_Direction.intValue = (int)direction;
} }
//EditorGUILayout.ColorField(m_Color); //EditorGUILayout.ColorField(m_Color);
@ -522,7 +517,7 @@ namespace UnityEngine.UI
string[] labels = string[] labels =
{ {
"None", "Horizontal", "None", "Horizontal",
"Vertical", "FourCorner" "Vertical", "FourCorner"
}; };
EditorGUI.BeginChangeCheck(); EditorGUI.BeginChangeCheck();
m_FlipMode.intValue = EnumPopupLayoutEx(m_FlipModeContent.text, typeof(UXImage.FlipMode), m_FlipMode.intValue, labels); m_FlipMode.intValue = EnumPopupLayoutEx(m_FlipModeContent.text, typeof(UXImage.FlipMode), m_FlipMode.intValue, labels);

View File

@ -5,7 +5,7 @@ namespace UnityEngine.UI
{ {
[CustomEditor(typeof(UXTextMeshPro), true)] [CustomEditor(typeof(UXTextMeshPro), true)]
[CanEditMultipleObjects] [CanEditMultipleObjects]
public class UXTextMeshProEditor : TMPro.EditorUtilities.TMP_EditorPanelUI internal class UXTextMeshProEditor : TMPro.EditorUtilities.TMP_EditorPanelUI
{ {
private SerializedProperty text; private SerializedProperty text;
private SerializedProperty localizationID; private SerializedProperty localizationID;