2021-01-11 08:54:28 +08:00
|
|
|
|
/************************************************/
|
|
|
|
|
|
/* */
|
|
|
|
|
|
/* Copyright (c) 2018 - 2021 monitor1394 */
|
|
|
|
|
|
/* https://github.com/monitor1394 */
|
|
|
|
|
|
/* */
|
|
|
|
|
|
/************************************************/
|
2019-10-22 04:09:04 +08:00
|
|
|
|
|
|
|
|
|
|
using UnityEditor;
|
2020-04-18 12:31:21 +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
|
|
|
|
|
|
{
|
2021-01-11 08:54:28 +08:00
|
|
|
|
protected SerializedProperty m_Grids;
|
2019-07-13 16:38:38 +08:00
|
|
|
|
protected SerializedProperty m_MultipleXAxis;
|
2021-01-11 08:54:28 +08:00
|
|
|
|
protected SerializedProperty m_XAxes;
|
2019-07-13 16:38:38 +08:00
|
|
|
|
protected SerializedProperty m_MultipleYAxis;
|
2021-01-11 08:54:28 +08:00
|
|
|
|
protected SerializedProperty m_YAxes;
|
|
|
|
|
|
protected SerializedProperty m_DataZooms;
|
|
|
|
|
|
protected SerializedProperty m_VisualMaps;
|
2019-05-11 04:33:54 +08:00
|
|
|
|
|
|
|
|
|
|
protected override void OnEnable()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.OnEnable();
|
2021-01-11 08:54:28 +08:00
|
|
|
|
m_Chart = (CoordinateChart)target;
|
|
|
|
|
|
m_Grids = serializedObject.FindProperty("m_Grids");
|
|
|
|
|
|
m_XAxes = serializedObject.FindProperty("m_XAxes");
|
|
|
|
|
|
m_YAxes = serializedObject.FindProperty("m_YAxes");
|
|
|
|
|
|
m_DataZooms = serializedObject.FindProperty("m_DataZooms");
|
|
|
|
|
|
m_VisualMaps = serializedObject.FindProperty("m_VisualMaps");
|
2019-05-11 04:33:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected override void OnStartInspectorGUI()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.OnStartInspectorGUI();
|
2021-01-11 08:54:28 +08:00
|
|
|
|
BlockListField(m_ShowAllComponent, m_DataZooms);
|
|
|
|
|
|
BlockListField(m_ShowAllComponent, m_VisualMaps);
|
|
|
|
|
|
BlockListField(m_ShowAllComponent, m_Grids);
|
|
|
|
|
|
BlockListField(m_ShowAllComponent, m_XAxes);
|
|
|
|
|
|
BlockListField(m_ShowAllComponent, m_YAxes);
|
2019-05-11 04:33:54 +08:00
|
|
|
|
}
|
2020-04-18 12:31:21 +08:00
|
|
|
|
|
2021-01-11 08:54:28 +08:00
|
|
|
|
protected override void MoreDebugInspector()
|
2020-04-18 12:31:21 +08:00
|
|
|
|
{
|
2021-01-11 08:54:28 +08:00
|
|
|
|
base.MoreDebugInspector();
|
2020-04-18 12:31:21 +08:00
|
|
|
|
CovertXYAxis();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void CovertXYAxis()
|
|
|
|
|
|
{
|
|
|
|
|
|
if (GUILayout.Button("Covert XY Axis"))
|
|
|
|
|
|
{
|
2021-01-11 08:54:28 +08:00
|
|
|
|
(m_Chart as CoordinateChart).CovertXYAxis(0);
|
2020-04-18 12:31:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2019-05-11 04:33:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|