v3.0.0-preivew8

This commit is contained in:
monitor1394
2022-04-26 08:24:45 +08:00
parent f11ee84517
commit 9dedc1db68
80 changed files with 1189 additions and 1307 deletions

View File

@@ -18,7 +18,7 @@ namespace XCharts.Editor
PropertyField(prop, "m_FoldSeries");
PropertyField(prop, "m_ShowDebugInfo");
PropertyField(prop, "m_ShowAllChartObject");
PropertyField(prop, "m_DebugInfoTextStyle");
PropertyField(prop, "m_LabelStyle");
--EditorGUI.indentLevel;
}
}

View File

@@ -18,6 +18,7 @@ namespace XCharts.Editor
PropertyField(prop, "m_Layer");
PropertyField(prop, "m_Align");
PropertyField(prop, "m_Sprite");
PropertyField(prop, "m_Type");
PropertyField(prop, "m_Color");
PropertyField(prop, "m_Width");
PropertyField(prop, "m_Height");

View File

@@ -0,0 +1,28 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
namespace XCharts.Editor
{
[CustomPropertyDrawer(typeof(ImageStyle), true)]
public class ImageStyleDrawer : BasePropertyDrawer
{
public override string ClassName { get { return "ImageStyle"; } }
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
{
base.OnGUI(pos, prop, label);
if (MakeComponentFoldout(prop, "m_Show", true))
{
++EditorGUI.indentLevel;
PropertyField(prop, "m_Sprite");
PropertyField(prop, "m_Type");
PropertyField(prop, "m_AutoColor");
PropertyField(prop, "m_Color");
PropertyField(prop, "m_Width");
PropertyField(prop, "m_Height");
--EditorGUI.indentLevel;
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4649856b17dfd4f628eb975040fb791c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -16,17 +16,18 @@ namespace XCharts.Editor
{
++EditorGUI.indentLevel;
PropertyField(prop, "m_Position");
PropertyField(prop, "m_Offset");
PropertyField(prop, "m_AutoOffset");
PropertyField(prop, "m_Rotate");
PropertyField(prop, "m_Distance");
PropertyField(prop, "m_Formatter");
PropertyField(prop, "m_NumericFormatter");
PropertyField(prop, "m_BackgroundWidth");
PropertyField(prop, "m_BackgroundHeight");
PropertyField(prop, "m_PaddingLeftRight");
PropertyField(prop, "m_PaddingTopBottom");
PropertyField(prop, "m_AutoOffset");
PropertyField(prop, "m_Offset");
PropertyField(prop, "m_Distance");
PropertyField(prop, "m_Rotate");
PropertyField(prop, "m_Width");
PropertyField(prop, "m_Height");
PropertyField(prop, "m_Icon");
PropertyField(prop, "m_Background");
PropertyField(prop, "m_TextStyle");
PropertyField(prop, "m_TextPadding");
--EditorGUI.indentLevel;
}
}
@@ -35,6 +36,6 @@ namespace XCharts.Editor
[CustomPropertyDrawer(typeof(EndLabelStyle), true)]
public class EndLabelStyleDrawer : LabelStyleDrawer
{
public override string ClassName { get { return "EndLabel"; } }
public override string ClassName { get { return "End Label"; } }
}
}

View File

@@ -0,0 +1,26 @@

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
namespace XCharts.Editor
{
[CustomPropertyDrawer(typeof(TextPadding), true)]
public class TextPaddingDrawer : BasePropertyDrawer
{
public override string ClassName { get { return "Padding"; } }
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
{
base.OnGUI(pos, prop, label);
if (MakeComponentFoldout(prop, "m_Show", true))
{
++EditorGUI.indentLevel;
PropertyField(prop, "m_Top");
PropertyField(prop, "m_Right");
PropertyField(prop, "m_Bottom");
PropertyField(prop, "m_Left");
--EditorGUI.indentLevel;
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 46cc25f4c9fc846938a06cf3b8fc75bd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -15,7 +15,7 @@ namespace XCharts.Editor
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
{
base.OnGUI(pos, prop, label);
if (MakeComponentFoldout(prop, "", true))
if (MakeComponentFoldout(prop, "m_Show", true))
{
++EditorGUI.indentLevel;
#if dUI_TextMeshPro
@@ -24,12 +24,8 @@ namespace XCharts.Editor
PropertyField(prop, "m_Font");
#endif
PropertyField(prop, "m_Rotate");
PropertyField(prop, "m_Offset");
PropertyField(prop, "m_ExtraWidth");
PropertyField(prop, "m_AutoColor");
PropertyField(prop, "m_Color");
PropertyField(prop, "m_AutoBackgroundColor");
PropertyField(prop, "m_BackgroundColor");
PropertyField(prop, "m_FontSize");
PropertyField(prop, "m_LineSpacing");
#if dUI_TextMeshPro
@@ -38,8 +34,8 @@ namespace XCharts.Editor
#else
PropertyField(prop, "m_FontStyle");
PropertyField(prop, "m_Alignment");
PropertyField(prop, "m_AutoWrap");
PropertyField(prop, "m_AutoAlign");
PropertyField(prop, "m_AutoWrap");
#endif
--EditorGUI.indentLevel;
}

View File

@@ -5,19 +5,8 @@ using XCharts.Runtime;
namespace XCharts.Editor
{
[CustomPropertyDrawer(typeof(TitleStyle), true)]
public class TitleStyleDrawer : BasePropertyDrawer
public class TitleStyleDrawer : LabelStyleDrawer
{
public override string ClassName { get { return "TitleStyle"; } }
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
{
base.OnGUI(pos, prop, label);
if (MakeComponentFoldout(prop, "m_Show", true))
{
++EditorGUI.indentLevel;
PropertyField(prop, "m_OffsetCenter");
PropertyField(prop, "m_TextStyle");
--EditorGUI.indentLevel;
}
}
}
}