AirControl  1.3.0
Open Source, Modular, and Extensible Flight Simulator For Deep Learning Research
Background.cs
1 using System.Net.Mime;
2 /************************************************/
3 /* */
4 /* Copyright (c) 2018 - 2021 monitor1394 */
5 /* https://github.com/monitor1394 */
6 /* */
7 /************************************************/
8 
9 using System;
10 using UnityEngine;
11 using UnityEngine.UI;
12 
13 namespace XCharts
14 {
27  [Serializable]
28  public class Background : MainComponent
29  {
30  [SerializeField] private bool m_Show = true;
31  [SerializeField] private Sprite m_Image;
32  [SerializeField] private Image.Type m_ImageType;
33  [SerializeField] private Color m_ImageColor = Color.white;
34  [SerializeField] private bool m_HideThemeBackgroundColor = true;
35 
41  public bool show
42  {
43  get { return m_Show; }
44  internal set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetComponentDirty(); }
45  }
50  public Sprite image
51  {
52  get { return m_Image; }
53  set { if (PropertyUtil.SetClass(ref m_Image, value)) SetComponentDirty(); }
54  }
55 
60  public Image.Type imageType
61  {
62  get { return m_ImageType; }
63  set { if (PropertyUtil.SetStruct(ref m_ImageType, value)) SetComponentDirty(); }
64  }
65 
69  public Color imageColor
70  {
71  get { return m_ImageColor; }
72  set { if (PropertyUtil.SetColor(ref m_ImageColor, value)) SetComponentDirty(); }
73  }
74 
79  public bool hideThemeBackgroundColor
80  {
81  get { return m_HideThemeBackgroundColor; }
82  set { if (PropertyUtil.SetStruct(ref m_HideThemeBackgroundColor, value)) SetVerticesDirty(); }
83  }
84 
85  public static Background defaultBackground
86  {
87  get
88  {
89  var background = new Background
90  {
91  m_Show = false,
92  m_Image = null,
93  m_ImageType = Image.Type.Sliced,
94  m_ImageColor = Color.white,
95  m_HideThemeBackgroundColor = true,
96  };
97  return background;
98  }
99  }
100  }
101 }
XCharts.Background.imageType
Image.Type imageType
the fill type of background image. 背景图填充类型。
Definition: Background.cs:61
XCharts.MainComponent
Definition: ChartComponent.cs:67
XCharts.Background
Background component. Due to the limitations of the framework, there are two limitations to the use o...
Definition: Background.cs:28
XCharts.Background.show
bool show
Whether to enable the background component. However, the ability to activate the background component...
Definition: Background.cs:42
XCharts
Definition: RewardChart.cs:14
XCharts.Background.hideThemeBackgroundColor
bool hideThemeBackgroundColor
Whether to hide the background color set in the theme when the background component is on....
Definition: Background.cs:80
XCharts.Background.imageColor
Color imageColor
背景图颜色。
Definition: Background.cs:70
XCharts.Background.image
Sprite image
the image of background. 背景图。
Definition: Background.cs:51