27 [SerializeField]
private bool m_Show =
true;
28 [SerializeField]
private float m_Left;
29 [SerializeField]
private float m_Right;
30 [SerializeField]
private float m_Top;
31 [SerializeField]
private float m_Bottom;
32 [SerializeField]
private Color m_BackgroundColor;
40 get {
return m_Show; }
41 set {
if (PropertyUtil.SetStruct(ref m_Show, value)) SetVerticesDirty(); }
49 get {
return m_Left; }
50 set {
if (PropertyUtil.SetStruct(ref m_Left, value)) SetAllDirty(); }
58 get {
return m_Right; }
59 set {
if (PropertyUtil.SetStruct(ref m_Right, value)) SetAllDirty(); }
68 set {
if (PropertyUtil.SetStruct(ref m_Top, value)) SetAllDirty(); }
76 get {
return m_Bottom; }
77 set {
if (PropertyUtil.SetStruct(ref m_Bottom, value)) SetAllDirty(); }
85 get {
return m_BackgroundColor; }
86 set {
if (PropertyUtil.SetColor(ref m_BackgroundColor, value)) SetVerticesDirty(); }
88 public int index {
get;
internal set; }
89 public float runtimeX {
get;
private set; }
90 public float runtimeY {
get;
private set; }
91 public float runtimeWidth {
get;
private set; }
92 public float runtimeHeight {
get;
private set; }
93 public Vector3 runtimePosition {
get;
private set; }
95 internal void UpdateRuntimeData(
float chartX,
float chartY,
float chartWidth,
float chartHeight)
99 var runtimeTop =
top <= 1 ?
top * chartHeight :
top;
101 runtimeX = chartX + runtimeLeft;
102 runtimeY = chartY + runtimeBottom;
103 runtimeWidth = chartWidth - runtimeLeft - runtimeRight;
104 runtimeHeight = chartHeight - runtimeTop - runtimeBottom;
105 runtimePosition =
new Vector3(runtimeX, runtimeY);
108 public static Grid defaultGrid