[feature][datazoom] 增加DataZoomMarqueeStyle支持框选区域

This commit is contained in:
monitor1394
2022-11-12 21:27:52 +08:00
parent 26ef85ce6f
commit 5e234dc408
10 changed files with 289 additions and 21 deletions

View File

@@ -0,0 +1,25 @@
using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
namespace XCharts.Editor
{
[CustomPropertyDrawer(typeof(MarqueeStyle), true)]
public class MarqueeStyleDrawer : BasePropertyDrawer
{
public override string ClassName { get { return "MarqueeStyle"; } }
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_Apply");
PropertyField(prop, "m_RealRect");
PropertyField(prop, "m_LineStyle");
PropertyField(prop, "m_AreaStyle");
--EditorGUI.indentLevel;
}
}
}
}

View File

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

View File

@@ -10,6 +10,7 @@ namespace XCharts.Editor
{
var m_SupportInside = baseProperty.FindPropertyRelative("m_SupportInside");
var m_SupportSlider = baseProperty.FindPropertyRelative("m_SupportSlider");
var m_SupportSelect = baseProperty.FindPropertyRelative("m_SupportSelect");
var m_Start = baseProperty.FindPropertyRelative("m_Start");
var m_End = baseProperty.FindPropertyRelative("m_End");
var m_MinShowNum = baseProperty.FindPropertyRelative("m_MinShowNum");
@@ -22,6 +23,7 @@ namespace XCharts.Editor
PropertyField("m_SupportInsideDrag");
}
PropertyField(m_SupportSlider);
PropertyField(m_SupportSelect);
PropertyField("m_ZoomLock");
PropertyField("m_ScrollSensitivity");
PropertyField("m_RangeMode");
@@ -54,6 +56,7 @@ namespace XCharts.Editor
PropertyListField("m_XAxisIndexs", true);
PropertyListField("m_YAxisIndexs", true);
}
PropertyField("m_MarqueeStyle");
--EditorGUI.indentLevel;
}
}