2019-05-11 04:33:54 +08:00
|
|
|
|
using UnityEditor;
|
2019-07-13 16:38:38 +08:00
|
|
|
|
using UnityEngine;
|
2019-05-11 04:33:54 +08:00
|
|
|
|
|
|
|
|
|
|
namespace XCharts
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
2019-06-13 09:53:03 +08:00
|
|
|
|
/// Editor class used to edit UI CoordinateChart.
|
2019-05-11 04:33:54 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
|
|
[CustomEditor(typeof(CoordinateChart), false)]
|
|
|
|
|
|
public class CoordinateChartEditor : BaseChartEditor
|
|
|
|
|
|
{
|
2019-08-01 23:49:30 +08:00
|
|
|
|
protected SerializedProperty m_Grid;
|
2019-07-13 16:38:38 +08:00
|
|
|
|
protected SerializedProperty m_MultipleXAxis;
|
|
|
|
|
|
protected SerializedProperty m_XAxises;
|
|
|
|
|
|
protected SerializedProperty m_MultipleYAxis;
|
|
|
|
|
|
protected SerializedProperty m_YAxises;
|
2019-06-13 09:53:03 +08:00
|
|
|
|
protected SerializedProperty m_DataZoom;
|
2019-10-14 07:45:56 +08:00
|
|
|
|
protected SerializedProperty m_VisualMap;
|
2019-05-11 04:33:54 +08:00
|
|
|
|
|
|
|
|
|
|
protected override void OnEnable()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.OnEnable();
|
|
|
|
|
|
m_Target = (CoordinateChart)target;
|
2019-08-01 23:49:30 +08:00
|
|
|
|
m_Grid = serializedObject.FindProperty("m_Grid");
|
2019-07-13 16:38:38 +08:00
|
|
|
|
m_XAxises = serializedObject.FindProperty("m_XAxises");
|
|
|
|
|
|
m_YAxises = serializedObject.FindProperty("m_YAxises");
|
2019-06-13 09:53:03 +08:00
|
|
|
|
m_DataZoom = serializedObject.FindProperty("m_DataZoom");
|
2019-10-14 07:45:56 +08:00
|
|
|
|
m_VisualMap = serializedObject.FindProperty("m_VisualMap");
|
2019-05-11 04:33:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected override void OnStartInspectorGUI()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.OnStartInspectorGUI();
|
2019-06-13 09:53:03 +08:00
|
|
|
|
EditorGUILayout.PropertyField(m_DataZoom);
|
2019-10-14 07:45:56 +08:00
|
|
|
|
EditorGUILayout.PropertyField(m_VisualMap);
|
2019-08-01 23:49:30 +08:00
|
|
|
|
EditorGUILayout.PropertyField(m_Grid);
|
2019-07-13 16:38:38 +08:00
|
|
|
|
for (int i = 0; i < m_XAxises.arraySize; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
SerializedProperty axis = m_XAxises.GetArrayElementAtIndex(i);
|
|
|
|
|
|
EditorGUILayout.PropertyField(axis);
|
|
|
|
|
|
}
|
|
|
|
|
|
for (int i = 0; i < m_YAxises.arraySize; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
SerializedProperty axis = m_YAxises.GetArrayElementAtIndex(i);
|
|
|
|
|
|
EditorGUILayout.PropertyField(axis);
|
|
|
|
|
|
}
|
2019-05-11 04:33:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|