mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 08:50:10 +00:00
增加Tooltip的alwayShow参数设置触发后一直显示
This commit is contained in:
@@ -63,6 +63,7 @@ namespace XCharts
|
||||
[SerializeField] private float m_PaddingLeftRight = 5f;
|
||||
[SerializeField] private float m_PaddingTopBottom = 5f;
|
||||
[SerializeField] private string m_IgnoreDataDefaultContent = "-";
|
||||
[SerializeField] private bool m_AlwayShow = true;
|
||||
[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);
|
||||
@@ -170,6 +171,10 @@ namespace XCharts
|
||||
/// </summary>
|
||||
public Sprite backgroundImage { get { return m_BackgroundImage; } set { m_BackgroundImage = value; SetBackground(m_BackgroundImage); } }
|
||||
/// <summary>
|
||||
/// 是否触发后一直显示。
|
||||
/// </summary>
|
||||
public bool alwayShow { get { return m_AlwayShow; } set { m_AlwayShow = value; } }
|
||||
/// <summary>
|
||||
/// 提示框内容文本样式。
|
||||
/// </summary>
|
||||
public TextStyle textStyle
|
||||
@@ -383,6 +388,7 @@ namespace XCharts
|
||||
/// <param name="flag"></param>
|
||||
public void SetActive(bool flag)
|
||||
{
|
||||
if(!flag && m_AlwayShow) return;
|
||||
lastDataIndex[0] = lastDataIndex[1] = -1;
|
||||
if (m_GameObject && m_GameObject.activeInHierarchy != flag)
|
||||
m_GameObject.SetActive(flag);
|
||||
|
||||
Reference in New Issue
Block a user