mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-20 07:20:08 +00:00
3.0 - unitypackage
This commit is contained in:
36
Editor/ChildComponents/SettingsDrawer.cs
Normal file
36
Editor/ChildComponents/SettingsDrawer.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(Settings), true)]
|
||||
public class SettingsDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Settings"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "", new HeaderMenuInfo("Reset", () =>
|
||||
{
|
||||
var chart = prop.serializedObject.targetObject as BaseChart;
|
||||
chart.settings.Reset();
|
||||
})))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_ReversePainter");
|
||||
PropertyField(prop, "m_MaxPainter");
|
||||
PropertyField(prop, "m_BasePainterMaterial");
|
||||
PropertyField(prop, "m_SeriePainterMaterial");
|
||||
PropertyField(prop, "m_TopPainterMaterial");
|
||||
PropertyField(prop, "m_LineSmoothStyle");
|
||||
PropertyField(prop, "m_LineSmoothness");
|
||||
PropertyField(prop, "m_LineSegmentDistance");
|
||||
PropertyField(prop, "m_CicleSmoothness");
|
||||
PropertyField(prop, "m_LegendIconLineWidth");
|
||||
PropertyListField(prop, "m_LegendIconCornerRadius", true);
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user