mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 09:20:08 +00:00
3.0 - unitypackage
This commit is contained in:
50
Editor/MainComponents/RadarCoordEditor.cs
Normal file
50
Editor/MainComponents/RadarCoordEditor.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
[ComponentEditor(typeof(RadarCoord))]
|
||||
public class RadarCoordEditor : MainComponentEditor<RadarCoord>
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField("m_Shape");
|
||||
PropertyField("m_PositionType");
|
||||
PropertyTwoFiled("m_Center");
|
||||
PropertyField("m_Radius");
|
||||
PropertyField("m_SplitNumber");
|
||||
PropertyField("m_CeilRate");
|
||||
PropertyField("m_IsAxisTooltip");
|
||||
PropertyField("m_OutRangeColor");
|
||||
PropertyField("m_ConnectCenter");
|
||||
PropertyField("m_LineGradient");
|
||||
PropertyField("m_AxisLine");
|
||||
PropertyField("m_SplitLine");
|
||||
PropertyField("m_SplitArea");
|
||||
PropertyField("m_IndicatorList");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(RadarCoord.Indicator), true)]
|
||||
public class RadarIndicatorDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Indicator"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, ""))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Name");
|
||||
PropertyField(prop, "m_Min");
|
||||
PropertyField(prop, "m_Max");
|
||||
PropertyTwoFiled(prop, "m_Range");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user