mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-17 22:10:11 +00:00
增加LabelStyle的autoRotate可设置有角度的竖版文本的自动旋转
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user