mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-24 01:40:06 +00:00
3.0 - optimize code
This commit is contained in:
@@ -21,7 +21,6 @@ namespace XCharts.Editor
|
||||
PropertyField(prop, "m_HighlightColor");
|
||||
PropertyField(prop, "m_HighlightToColor");
|
||||
PropertyField(prop, "m_Opacity");
|
||||
PropertyField(prop, "m_TooltipHighlight");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace XCharts.Editor
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_FoldSeries");
|
||||
PropertyField(prop, "m_ShowDebugInfo");
|
||||
PropertyField(prop, "m_ShowAllChildObject");
|
||||
PropertyField(prop, "m_ShowAllChartObject");
|
||||
PropertyField(prop, "m_DebugInfoTextStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ namespace XCharts.Editor
|
||||
PropertyField(prop, "m_BackgroundWidth");
|
||||
PropertyField(prop, "m_CenterColor");
|
||||
PropertyField(prop, "m_CenterGap");
|
||||
PropertyField(prop, "m_BorderType");
|
||||
PropertyField(prop, "m_BorderWidth");
|
||||
PropertyField(prop, "m_BorderColor");
|
||||
PropertyField(prop, "m_BorderColor0");
|
||||
|
||||
38
Editor/ChildComponents/LevelStyleDrawer.cs
Normal file
38
Editor/ChildComponents/LevelStyleDrawer.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(LevelStyle), true)]
|
||||
public class LevelStyleDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "LevelStyle"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyListField(prop, "m_Levels");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(Level), true)]
|
||||
public class LevelDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Level"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Label");
|
||||
PropertyField(prop, "m_UpperLabel");
|
||||
PropertyField(prop, "m_ItemStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Editor/ChildComponents/LevelStyleDrawer.cs.meta
Normal file
11
Editor/ChildComponents/LevelStyleDrawer.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7a1ff119a53a44e5abe2ef6f57816aa6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -39,7 +39,7 @@ namespace XCharts.Editor
|
||||
PropertyField(prop, "m_DataScale");
|
||||
PropertyField(prop, "m_SelectedDataScale");
|
||||
break;
|
||||
case SymbolSizeType.Callback:
|
||||
case SymbolSizeType.Function:
|
||||
break;
|
||||
}
|
||||
PropertyField(prop, "m_StartIndex");
|
||||
|
||||
Reference in New Issue
Block a user