mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 17:30:10 +00:00
[feature][datazoom] 增加DataZoom的MarqueeStyle支持框选区域
This commit is contained in:
25
Editor/ChildComponents/MarqueeStyleDrawer.cs
Normal file
25
Editor/ChildComponents/MarqueeStyleDrawer.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Editor/ChildComponents/MarqueeStyleDrawer.cs.meta
Normal file
11
Editor/ChildComponents/MarqueeStyleDrawer.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1a225478c2e14da3854aea28fb59882
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user