增加PolarCoodindicatorLabelOffset设置指示文本偏移的支持

This commit is contained in:
monitor1394
2023-07-03 23:10:35 +08:00
parent 4a754c0021
commit bc1596f8d3

View File

@@ -16,6 +16,7 @@ namespace XCharts.Runtime
[SerializeField] private float[] m_Center = new float[2] { 0.5f, 0.45f };
[SerializeField] private float[] m_Radius = new float[2] { 0, 0.35f };
[SerializeField] private Color m_BackgroundColor;
[SerializeField][Since("v3.8.0")] private float m_IndicatorLabelOffset = 30f;
public PolarCoordContext context = new PolarCoordContext();
@@ -58,6 +59,16 @@ namespace XCharts.Runtime
set { if (PropertyUtil.SetColor(ref m_BackgroundColor, value)) SetVerticesDirty(); }
}
/// <summary>
/// The offset of indicator label.
/// |指示器标签的偏移量。
/// </summary>
public float indicatorLabelOffset
{
get { return m_IndicatorLabelOffset; }
set { if (PropertyUtil.SetStruct(ref m_IndicatorLabelOffset, value)) SetVerticesDirty(); }
}
public bool IsPointerEnter()
{
return context.isPointerEnter;