AirControl  1.3.0
Open Source, Modular, and Extensible Flight Simulator For Deep Learning Research
SerieLabelDrawer.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(SerieLabel), true)]
15  {
16  public override string ClassName { get { return "Label"; } }
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  PropertyField(prop, "m_Position");
24  PropertyField(prop, "m_Offset");
25  PropertyField(prop, "m_AutoOffset");
26  PropertyField(prop, "m_Margin");
27  PropertyField(prop, "m_Formatter");
28  PropertyField(prop, "m_NumericFormatter");
29  PropertyField(prop, "m_BackgroundWidth");
30  PropertyField(prop, "m_BackgroundHeight");
31  PropertyField(prop, "m_PaddingLeftRight");
32  PropertyField(prop, "m_PaddingTopBottom");
33  PropertyField(prop, "m_Border");
34  PropertyField(prop, "m_BorderWidth");
35  PropertyField(prop, "m_BorderColor");
36  PropertyField(prop, "m_Line");
37  PropertyField(prop, "m_LineType");
38  PropertyField(prop, "m_LineColor");
39  PropertyField(prop, "m_LineWidth");
40  PropertyField(prop, "m_LineGap");
41  PropertyField(prop, "m_LineLength1");
42  PropertyField(prop, "m_LineLength2");
43  PropertyField(prop, "m_TextStyle");
44  --EditorGUI.indentLevel;
45  }
46  }
47  }
48 }
XCharts.BasePropertyDrawer
Definition: BasePropertyDrawer.cs:15
XCharts
Definition: RewardChart.cs:14
XCharts.SerieLabelDrawer
Definition: SerieLabelDrawer.cs:14
XCharts.SerieSymbolType.Rect
@ Rect
正方形。可通过设置itemStyle的cornerRadius变成圆角矩形。