mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-20 15:30:09 +00:00
调整UI组件相关代码
This commit is contained in:
@@ -17,6 +17,8 @@ namespace XCharts.Runtime
|
||||
[SerializeField] private Sprite m_Image;
|
||||
[SerializeField] private Image.Type m_ImageType;
|
||||
[SerializeField] private Color m_ImageColor = Color.white;
|
||||
[SerializeField][Since("v3.10.0")] private float m_ImageWidth = 0;
|
||||
[SerializeField][Since("v3.10.0")] private float m_ImageHeight = 0;
|
||||
[SerializeField] private bool m_AutoColor = true;
|
||||
[SerializeField][Since("v3.10.0")] private BorderStyle m_BorderStyle = new BorderStyle();
|
||||
|
||||
@@ -58,6 +60,26 @@ namespace XCharts.Runtime
|
||||
set { if (PropertyUtil.SetColor(ref m_ImageColor, value)) SetComponentDirty(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// the width of background image.
|
||||
/// ||背景图宽度。
|
||||
/// </summary>
|
||||
public float imageWidth
|
||||
{
|
||||
get { return m_ImageWidth; }
|
||||
set { if (PropertyUtil.SetStruct(ref m_ImageWidth, value)) SetComponentDirty(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// the height of background image.
|
||||
/// ||背景图高度。
|
||||
/// </summary>
|
||||
public float imageHeight
|
||||
{
|
||||
get { return m_ImageHeight; }
|
||||
set { if (PropertyUtil.SetStruct(ref m_ImageHeight, value)) SetComponentDirty(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether to use theme background color for component color when the background component is on.
|
||||
/// ||当background组件开启时,是否自动使用主题背景色作为backgrounnd组件的颜色。当设置为false时,用imageColor作为颜色。
|
||||
|
||||
Reference in New Issue
Block a user