AirControl  1.3.0
Open Source, Modular, and Extensible Flight Simulator For Deep Learning Research
LineArrowDrawer.cs
1 /************************************************/
2 /* */
3 /* Copyright (c) 2018 - 2021 monitor1394 */
4 /* https://github.com/monitor1394 */
5 /* */
6 /************************************************/
7 
8 using System.Collections.Generic;
9 using UnityEditor;
10 using UnityEngine;
11 
12 namespace XCharts
13 {
14  [CustomPropertyDrawer(typeof(Arrow), true)]
16  {
17  public override string ClassName { get { return "Arrow"; } }
18  public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
19  {
20  base.OnGUI(pos, prop, label);
21  if (MakeFoldout(prop, ""))
22  {
23  ++EditorGUI.indentLevel;
24  PropertyField(prop, "m_Width");
25  PropertyField(prop, "m_Height");
26  PropertyField(prop, "m_Offset");
27  PropertyField(prop, "m_Dent");
28  PropertyField(prop, "m_Color");
29  --EditorGUI.indentLevel;
30  }
31  }
32  }
33 
34  [CustomPropertyDrawer(typeof(LineArrow), true)]
36  {
37  public override string ClassName { get { return "LineArrow"; } }
38  public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
39  {
40  base.OnGUI(pos, prop, label);
41  if (MakeFoldout(prop, "m_Show"))
42  {
43  ++EditorGUI.indentLevel;
44  PropertyField(prop, "m_Position");
45  PropertyField(prop, "m_Arrow");
46  --EditorGUI.indentLevel;
47  }
48  }
49  }
50 }
XCharts.BasePropertyDrawer
Definition: BasePropertyDrawer.cs:15
XCharts.ArrowDrawer
Definition: LineArrowDrawer.cs:15
XCharts
Definition: RewardChart.cs:14
XCharts.LineArrow
Definition: LineArrow.cs:16
XCharts.LineArrowStyleDrawer
Definition: LineArrowDrawer.cs:35
XCharts.SerieSymbolType.Rect
@ Rect
正方形。可通过设置itemStyle的cornerRadius变成圆角矩形。