增加Tooltipoffset参数配置偏移

This commit is contained in:
monitor1394
2020-07-07 07:16:01 +08:00
parent a135b56259
commit 9244d9f996
12 changed files with 18 additions and 28 deletions

View File

@@ -64,6 +64,7 @@ namespace XCharts
[SerializeField] private float m_PaddingTopBottom = 5f;
[SerializeField] private string m_IgnoreDataDefaultContent = "-";
[SerializeField] private bool m_AlwayShow = false;
[SerializeField] private Vector2 m_Offset = new Vector2(18f, -25f);
[SerializeField] private Sprite m_BackgroundImage;
[SerializeField] private TextStyle m_TextStyle = new TextStyle(18, FontStyle.Normal);
[SerializeField] private LineStyle m_LineStyle = new LineStyle(LineStyle.Type.Solid, 0.7f);
@@ -175,6 +176,10 @@ namespace XCharts
/// </summary>
public bool alwayShow { get { return m_AlwayShow; } set { m_AlwayShow = value; } }
/// <summary>
/// 提示框相对于鼠标位置的偏移。
/// </summary>
public Vector2 offset { get { return m_Offset; } set { m_Offset = value; } }
/// <summary>
/// 提示框内容文本样式。
/// </summary>
public TextStyle textStyle