增加LabelStyleautoRotate可设置有角度的竖版文本的自动旋转

This commit is contained in:
monitor1394
2023-03-12 22:56:36 +08:00
parent adbd88c411
commit dbb867e0ab
8 changed files with 45 additions and 16 deletions

View File

@@ -169,6 +169,11 @@ namespace XCharts.Runtime
if (m_LabelText != null) m_LabelText.SetColor(color);
}
public void SetRotate(float rotate)
{
transform.localEulerAngles = new Vector3(0, 0, rotate);
}
public void SetTextRotate(float rotate)
{
if (m_LabelText != null) m_LabelText.SetLocalEulerAngles(new Vector3(0, 0, rotate));
@@ -196,16 +201,15 @@ namespace XCharts.Runtime
public void SetActive(bool flag)
{
if (m_Active != flag)
{
m_Active = flag;
ChartHelper.SetActive(gameObject, flag);
}
m_Active = flag;
ChartHelper.SetActive(gameObject, flag);
}
public void SetTextActive(bool flag)
{
if (m_LabelText != null) m_LabelText.SetActive(flag);
}
public void SetIconActive(bool flag)
{
isIconActive = flag;