AirControl  1.3.0
Open Source, Modular, and Extensible Flight Simulator For Deep Learning Research
RadarDrawer.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(Radar), true)]
16  {
17  public override string ClassName { get { return "Radar"; } }
18  public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
19  {
20  base.OnGUI(pos, prop, label);
21  if (MakeFoldout(prop, "m_Show"))
22  {
23  ++EditorGUI.indentLevel;
24  PropertyField(prop, "m_Shape");
25  PropertyField(prop, "m_PositionType");
26  PropertyTwoFiled(prop, "m_Center");
27  PropertyField(prop, "m_Radius");
28  PropertyField(prop, "m_SplitNumber");
29  PropertyField(prop, "m_CeilRate");
30  PropertyField(prop, "m_IsAxisTooltip");
31  PropertyField(prop, "m_OutRangeColor");
32  PropertyField(prop, "m_ConnectCenter");
33  PropertyField(prop, "m_LineGradient");
34  PropertyField(prop, "m_AxisLine");
35  PropertyField(prop, "m_SplitLine");
36  PropertyField(prop, "m_SplitArea");
37  PropertyField(prop, "m_IndicatorList");
38  --EditorGUI.indentLevel;
39  }
40  }
41  }
42 
43  [CustomPropertyDrawer(typeof(Radar.Indicator), true)]
45  {
46  public override string ClassName { get { return "Indicator"; } }
47  public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
48  {
49  base.OnGUI(pos, prop, label);
50  if (MakeFoldout(prop, ""))
51  {
52  ++EditorGUI.indentLevel;
53  PropertyField(prop, "m_Name");
54  PropertyField(prop, "m_Min");
55  PropertyField(prop, "m_Max");
56  PropertyTwoFiled(prop, "m_Range");
57  PropertyField(prop, "m_TextStyle");
58  --EditorGUI.indentLevel;
59  }
60  }
61  }
62 }
XCharts.BasePropertyDrawer
Definition: BasePropertyDrawer.cs:15
XCharts.Radar.Indicator
Indicator of radar chart, which is used to assign multiple variables(dimensions) in radar chart....
Definition: Radar.cs:54
XCharts
Definition: RewardChart.cs:14
XCharts.Radar
Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适用于雷达图。
Definition: Radar.cs:21
XCharts.RadarDrawer
Definition: RadarDrawer.cs:15
XCharts.SerieSymbolType.Rect
@ Rect
正方形。可通过设置itemStyle的cornerRadius变成圆角矩形。
XCharts.RadarIndicatorDrawer
Definition: RadarDrawer.cs:44