mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 17:30:10 +00:00
整理代码
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
@@ -107,7 +106,7 @@ namespace XCharts
|
||||
EditorGUI.PropertyField(drawRect, m_AxisTick);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_AxisTick);
|
||||
|
||||
|
||||
if (type == Axis.AxisType.Category)
|
||||
{
|
||||
drawRect.width = EditorGUIUtility.labelWidth + 10;
|
||||
@@ -154,11 +153,12 @@ namespace XCharts
|
||||
{
|
||||
height += EditorGUIUtility.singleLineHeight * 3 + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}else if(type == Axis.AxisType.Value)
|
||||
}
|
||||
else if (type == Axis.AxisType.Value)
|
||||
{
|
||||
height += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
SerializedProperty m_MinMaxType = prop.FindPropertyRelative("m_MinMaxType");
|
||||
if(m_MinMaxType.enumValueIndex == (int)Axis.AxisMinMaxType.Custom)
|
||||
if (m_MinMaxType.enumValueIndex == (int)Axis.AxisMinMaxType.Custom)
|
||||
{
|
||||
height += EditorGUIUtility.singleLineHeight * 2 + EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
@@ -166,7 +166,7 @@ namespace XCharts
|
||||
height += EditorGUI.GetPropertyHeight(m_AxisTick);
|
||||
return height;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
@@ -22,7 +21,7 @@ namespace XCharts
|
||||
SerializedProperty m_FontSize = prop.FindPropertyRelative("m_FontSize");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_CoordinateModuleToggle, "Coordinate");
|
||||
EditorGUI.LabelField(drawRect, "Coordinate",EditorStyles.boldLabel);
|
||||
EditorGUI.LabelField(drawRect, "Coordinate", EditorStyles.boldLabel);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (m_CoordinateModuleToggle)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
@@ -63,7 +62,7 @@ namespace XCharts
|
||||
SerializedProperty location = prop.FindPropertyRelative("m_Location");
|
||||
height += 5 * EditorGUIUtility.singleLineHeight + 4 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(location);
|
||||
height += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (m_DataFoldout)
|
||||
{
|
||||
SerializedProperty m_Data = prop.FindPropertyRelative("m_Data");
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
@@ -49,7 +48,7 @@ namespace XCharts
|
||||
if (m_Point.boolValue)
|
||||
{
|
||||
drawRect.x = EditorGUIUtility.labelWidth + 15;
|
||||
EditorGUI.LabelField(drawRect,"Width");
|
||||
EditorGUI.LabelField(drawRect, "Width");
|
||||
drawRect.x = EditorGUIUtility.labelWidth + 65;
|
||||
float tempWidth = EditorGUIUtility.currentViewWidth - EditorGUIUtility.labelWidth - 70;
|
||||
if (tempWidth < 20) tempWidth = 20;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
@@ -63,13 +62,13 @@ namespace XCharts
|
||||
if (m_RadarModuleToggle)
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
|
||||
|
||||
EditorGUIUtility.fieldWidth = 10;
|
||||
|
||||
|
||||
EditorGUIUtility.labelWidth = 50;
|
||||
drawRect.width = 60;
|
||||
EditorGUI.PropertyField(drawRect, m_Cricle);
|
||||
|
||||
|
||||
EditorGUIUtility.labelWidth = 45;
|
||||
drawRect.x += 60;
|
||||
EditorGUI.PropertyField(drawRect, m_Area);
|
||||
@@ -129,7 +128,7 @@ namespace XCharts
|
||||
if (m_RadarModuleToggle)
|
||||
{
|
||||
propNum += 13;
|
||||
|
||||
|
||||
if (m_BackgroundColorToggle)
|
||||
{
|
||||
m_BackgroundColorList = prop.FindPropertyRelative("m_BackgroundColorList");
|
||||
@@ -139,14 +138,14 @@ namespace XCharts
|
||||
if (m_IndicatorJsonAreaToggle) propNum += 4;
|
||||
|
||||
|
||||
float height = propNum * EditorGUIUtility.singleLineHeight + (propNum -1) * EditorGUIUtility.standardVerticalSpacing;
|
||||
float height = propNum * EditorGUIUtility.singleLineHeight + (propNum - 1) * EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
if (m_IndicatorToggle)
|
||||
{
|
||||
m_IndicatorList = prop.FindPropertyRelative("m_IndicatorList");
|
||||
height += EditorGUIUtility.singleLineHeight * 2 + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
for(int i = 0; i < m_IndicatorSize; i++)
|
||||
for (int i = 0; i < m_IndicatorSize; i++)
|
||||
{
|
||||
height += EditorGUI.GetPropertyHeight(m_IndicatorList.GetArrayElementAtIndex(i));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
@@ -31,12 +30,12 @@ namespace XCharts
|
||||
if (m_RadarModuleToggle)
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
|
||||
|
||||
EditorGUI.PropertyField(drawRect, m_Name);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Max);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
@@ -47,7 +46,7 @@ namespace XCharts
|
||||
if (m_RadarModuleToggle)
|
||||
{
|
||||
propNum += 2;
|
||||
return propNum * EditorGUIUtility.singleLineHeight + (propNum -1) * EditorGUIUtility.standardVerticalSpacing;
|
||||
return propNum * EditorGUIUtility.singleLineHeight + (propNum - 1) * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
@@ -27,7 +26,7 @@ namespace XCharts
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
if(m_TooltipModuleToggle)
|
||||
if (m_TooltipModuleToggle)
|
||||
return 2 * (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing);
|
||||
else
|
||||
return 1 * (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing);
|
||||
|
||||
Reference in New Issue
Block a user