增加AnimationInteraction交互动画配置支持

This commit is contained in:
monitor1394
2023-07-14 08:14:00 +08:00
parent ccd71710ce
commit 58d6d52747
20 changed files with 156 additions and 66 deletions

View File

@@ -50,6 +50,23 @@ namespace XCharts.Editor
}
}
[CustomPropertyDrawer(typeof(XCharts.Runtime.AnimationInteraction), true)]
public class AnimationInteractionDrawer : BasePropertyDrawer
{
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
{
base.OnGUI(pos, prop, label);
if (MakeComponentFoldout(prop, "m_Enable", true))
{
++EditorGUI.indentLevel;
PropertyField(prop, "m_Duration");
PropertyField(prop, "m_WidthRate");
PropertyField(prop, "m_RadiusRate");
--EditorGUI.indentLevel;
}
}
}
[CustomPropertyDrawer(typeof(AnimationStyle), true)]
public class AnimationDrawer : BasePropertyDrawer
{
@@ -66,6 +83,7 @@ namespace XCharts.Editor
PropertyField(prop, "m_FadeOut");
PropertyField(prop, "m_Change");
PropertyField(prop, "m_Addition");
PropertyField(prop, "m_Interaction");
--EditorGUI.indentLevel;
}
}