AirControl  1.3.0
Open Source, Modular, and Extensible Flight Simulator For Deep Learning Research
LineDrawer.cs
1 /************************************************/
2 /* */
3 /* Copyright (c) 2018 - 2021 monitor1394 */
4 /* https://github.com/monitor1394 */
5 /* */
6 /************************************************/
7 
8 using UnityEditor;
9 using UnityEngine;
10 
11 namespace XCharts
12 {
13  [CustomPropertyDrawer(typeof(BaseLine), true)]
15  {
16  public override string ClassName { get { return "Line"; } }
17  public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
18  {
19  base.OnGUI(pos, prop, label);
20  if (MakeFoldout(prop, "m_Show"))
21  {
22  ++EditorGUI.indentLevel;
23  DrawExtendeds(prop);
24  PropertyField(prop, "m_LineStyle");
25  --EditorGUI.indentLevel;
26  }
27  }
28  }
29 
30  [CustomPropertyDrawer(typeof(AxisLine), true)]
32  {
33  public override string ClassName { get { return "AxisLine"; } }
34  protected override void DrawExtendeds(SerializedProperty prop)
35  {
36  base.DrawExtendeds(prop);
37  PropertyField(prop, "m_OnZero");
38  PropertyField(prop, "m_ShowArrow");
39  PropertyField(prop, "m_Arrow");
40  }
41  }
42 
43  [CustomPropertyDrawer(typeof(AxisSplitLine), true)]
45  {
46  public override string ClassName { get { return "SplitLine"; } }
47  protected override void DrawExtendeds(SerializedProperty prop)
48  {
49  base.DrawExtendeds(prop);
50  PropertyField(prop, "m_Interval");
51  }
52  }
53  [CustomPropertyDrawer(typeof(AxisTick), true)]
55  {
56  public override string ClassName { get { return "AxisTick"; } }
57  protected override void DrawExtendeds(SerializedProperty prop)
58  {
59  base.DrawExtendeds(prop);
60  PropertyField(prop, "m_AlignWithLabel");
61  PropertyField(prop, "m_Inside");
62  PropertyField(prop, "m_ShowStartTick");
63  PropertyField(prop, "m_ShowEndTick");
64  }
65  }
66 
67  [CustomPropertyDrawer(typeof(GaugeAxisSplitLine), true)]
69  {
70  public override string ClassName { get { return "Split Line"; } }
71  }
72 
73  [CustomPropertyDrawer(typeof(GaugeAxisTick), true)]
75  {
76  public override string ClassName { get { return "Axis Tick"; } }
77  protected override void DrawExtendeds(SerializedProperty prop)
78  {
79  base.DrawExtendeds(prop);
80  PropertyField(prop, "m_SplitNumber");
81  }
82  }
83 
84  [CustomPropertyDrawer(typeof(GaugeAxisLine), true)]
86  {
87  public override string ClassName { get { return "Axis Line"; } }
88  protected override void DrawExtendeds(SerializedProperty prop)
89  {
90  base.DrawExtendeds(prop);
91  PropertyField(prop, "m_BarColor");
92  PropertyField(prop, "m_BarBackgroundColor");
93  PropertyField(prop, "m_StageColor");
94  }
95  }
96 }
XCharts.BasePropertyDrawer
Definition: BasePropertyDrawer.cs:15
XCharts.BaseLineDrawer
Definition: LineDrawer.cs:14
XCharts.GaugeAxisLineDrawer
Definition: LineDrawer.cs:85
XCharts.GaugeAxisTick
刻度
Definition: GaugeAxisTick.cs:16
XCharts.GaugeAxisTickDrawer
Definition: LineDrawer.cs:74
XCharts.GaugeAxisLine
Definition: GaugeAxisLine.cs:35
XCharts.GaugeAxisSplitLine
分割线
Definition: GaugeAxisSplitLine.cs:14
XCharts.AxisTick
Settings related to axis tick. 坐标轴刻度相关设置。
Definition: AxisTick.cs:18
XCharts
Definition: RewardChart.cs:14
XCharts.AxisSplitLineDrawer
Definition: LineDrawer.cs:44
XCharts.GaugeAxisSplitDrawer
Definition: LineDrawer.cs:68
XCharts.AxisTickDrawer
Definition: LineDrawer.cs:54
XCharts.SerieSymbolType.Rect
@ Rect
正方形。可通过设置itemStyle的cornerRadius变成圆角矩形。
XCharts.AxisLine
Settings related to axis line. 坐标轴轴线。
Definition: AxisLine.cs:17
XCharts.AxisLineDrawer
Definition: LineDrawer.cs:31
XCharts.AxisSplitLine
Split line of axis in grid area. 坐标轴在 grid 区域中的分隔线。
Definition: AxisSplitLine.cs:18