增加UI组件支持

This commit is contained in:
monitor1394
2023-03-20 21:56:56 +08:00
parent a0db57bdf2
commit a50b58d48e
10 changed files with 401 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
namespace XCharts.Editor
{
[CustomPropertyDrawer(typeof(UIComponentTheme), true)]
public class UIComponentThemeDrawer : BasePropertyDrawer
{
public override string ClassName { get { return "Theme"; } }
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
{
base.OnGUI(pos, prop, label);
if (MakeComponentFoldout(prop, "m_Show", true))
{
++EditorGUI.indentLevel;
PropertyField(prop, "m_SharedTheme");
PropertyField(prop, "m_TransparentBackground");
--EditorGUI.indentLevel;
}
}
}
}