Files
XCharts/Editor/ChildComponents/LabelLineDrawer.cs
2022-01-05 21:40:48 +08:00

27 lines
889 B
C#

using UnityEditor;
using UnityEngine;
namespace XCharts.Editor
{
[CustomPropertyDrawer(typeof(LabelLine), true)]
public class LabelLineDrawer : BasePropertyDrawer
{
public override string ClassName { get { return "LabelLine"; } }
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
{
base.OnGUI(pos, prop, label);
if (MakeComponentFoldout(prop, "m_Show"))
{
++EditorGUI.indentLevel;
PropertyField(prop, "m_LineType");
PropertyField(prop, "m_LineColor");
PropertyField(prop, "m_LineWidth");
PropertyField(prop, "m_LineGap");
PropertyField(prop, "m_LineLength1");
PropertyField(prop, "m_LineLength2");
--EditorGUI.indentLevel;
}
}
}
}