Files
XCharts/Editor/PropertyDrawers/AnimationDrawer.cs

35 lines
1.3 KiB
C#
Raw Normal View History

2021-01-11 08:54:28 +08:00
/************************************************/
/* */
/* Copyright (c) 2018 - 2021 monitor1394 */
/* https://github.com/monitor1394 */
/* */
/************************************************/
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace XCharts
{
2019-10-25 08:48:32 +08:00
[CustomPropertyDrawer(typeof(SerieAnimation), true)]
2021-01-11 08:54:28 +08:00
public class AnimationDrawer : BasePropertyDrawer
{
2021-01-11 08:54:28 +08:00
public override string ClassName { get { return "Animation"; } }
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
{
2021-01-11 08:54:28 +08:00
base.OnGUI(pos, prop, label);
if (MakeFoldout(prop, "m_Enable"))
{
++EditorGUI.indentLevel;
2021-01-11 08:54:28 +08:00
PropertyField(prop, "m_FadeInDuration");
PropertyField(prop, "m_FadeInDelay");
PropertyField(prop, "m_FadeOutDuration");
PropertyField(prop, "m_FadeOutDelay");
PropertyField(prop, "m_DataChangeEnable");
PropertyField(prop, "m_DataChangeDuration");
PropertyField(prop, "m_ActualDuration");
--EditorGUI.indentLevel;
}
}
}
}