mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-19 06:50:18 +00:00
3.0 - unitypackage
This commit is contained in:
35
Editor/MainComponents/VesselEditor.cs
Normal file
35
Editor/MainComponents/VesselEditor.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
[ComponentEditor(typeof(Vessel))]
|
||||
public class VesselEditor : MainComponentEditor<Vessel>
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
var shape = (Vessel.Shape)baseProperty.FindPropertyRelative("m_Shape").intValue;
|
||||
PropertyField("m_Shape");
|
||||
PropertyField("m_ShapeWidth");
|
||||
PropertyField("m_Gap");
|
||||
PropertyTwoFiled("m_Center");
|
||||
PropertyField("m_BackgroundColor");
|
||||
PropertyField("m_Color");
|
||||
PropertyField("m_AutoColor");
|
||||
switch (shape)
|
||||
{
|
||||
case Vessel.Shape.Circle:
|
||||
PropertyField("m_Radius");
|
||||
PropertyField("m_Smoothness");
|
||||
break;
|
||||
case Vessel.Shape.Rect:
|
||||
PropertyField("m_Width");
|
||||
PropertyField("m_Height");
|
||||
PropertyField("m_CornerRadius");
|
||||
break;
|
||||
}
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user