增加chartName属性可指定图表的别称

This commit is contained in:
monitor1394
2020-05-18 07:36:01 +08:00
parent f23347a86e
commit 008e2210d4
9 changed files with 64 additions and 57 deletions

View File

@@ -30,7 +30,6 @@ namespace XCharts
protected SerializedProperty m_Settings;
protected SerializedProperty m_Large;
protected SerializedProperty m_ChartName;
protected SerializedProperty m_ChartUUID;
protected float m_DefaultLabelWidth;
protected float m_DefaultFieldWidth;
@@ -43,7 +42,6 @@ namespace XCharts
m_Target = (BaseChart)target;
m_Script = serializedObject.FindProperty("m_Script");
m_ChartName = serializedObject.FindProperty("m_ChartName");
m_ChartUUID = serializedObject.FindProperty("m_ChartUUID");
m_ChartWidth = serializedObject.FindProperty("m_ChartWidth");
m_ChartHeight = serializedObject.FindProperty("m_ChartHeight");
m_Theme = serializedObject.FindProperty("m_Theme");
@@ -79,21 +77,8 @@ namespace XCharts
protected virtual void OnStartInspectorGUI()
{
EditorGUILayout.PropertyField(m_Script);
// EditorGUI.BeginChangeCheck();
// EditorGUILayout.PropertyField(m_ChartName);
// if (EditorGUI.EndChangeCheck())
// {
// if (XChartsMgr.Instance.ContainsChart(m_ChartName.stringValue))
// {
// m_ChartName.stringValue = "";
// serializedObject.ApplyModifiedProperties();
// }
// else
// {
// m_ChartUUID.stringValue = m_ChartName.stringValue;
// }
// }
// EditorGUILayout.PropertyField(m_ChartUUID);
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(m_ChartName);
EditorGUILayout.PropertyField(m_ThemeInfo, true);
EditorGUILayout.PropertyField(m_Title, true);
EditorGUILayout.PropertyField(m_Legend, true);