mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-18 22:40:10 +00:00
3.0
This commit is contained in:
71
Runtime/Component/Emphasis/Emphasis.cs
Normal file
71
Runtime/Component/Emphasis/Emphasis.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Runtime
|
||||
{
|
||||
/// <summary>
|
||||
/// 高亮的图形样式和文本标签样式。
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class Emphasis : ChildComponent, ISerieExtraComponent, ISerieDataComponent
|
||||
{
|
||||
[SerializeField] private bool m_Show;
|
||||
[SerializeField] private LabelStyle m_Label = new LabelStyle();
|
||||
[SerializeField] private LabelLine m_LabelLine = new LabelLine();
|
||||
[SerializeField] private ItemStyle m_ItemStyle = new ItemStyle();
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
m_Show = false;
|
||||
m_Label.Reset();
|
||||
m_LabelLine.Reset();
|
||||
m_ItemStyle.Reset();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用高亮样式。
|
||||
/// </summary>
|
||||
public bool show
|
||||
{
|
||||
get { return m_Show; }
|
||||
set { m_Show = value; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 图形文本标签。
|
||||
/// </summary>
|
||||
public LabelStyle label
|
||||
{
|
||||
get { return m_Label; }
|
||||
set { if (PropertyUtil.SetClass(ref m_Label, value, true)) SetAllDirty(); }
|
||||
}
|
||||
public LabelLine labelLine
|
||||
{
|
||||
get { return m_LabelLine; }
|
||||
set { if (PropertyUtil.SetClass(ref m_LabelLine, value, true)) SetAllDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 图形样式。
|
||||
/// </summary>
|
||||
public ItemStyle itemStyle
|
||||
{
|
||||
get { return m_ItemStyle; }
|
||||
set { if (PropertyUtil.SetClass(ref m_ItemStyle, value, true)) SetVerticesDirty(); }
|
||||
}
|
||||
|
||||
public override bool vertsDirty { get { return m_VertsDirty || label.vertsDirty || itemStyle.vertsDirty; } }
|
||||
|
||||
public override bool componentDirty { get { return m_ComponentDirty || label.componentDirty; } }
|
||||
|
||||
public override void ClearVerticesDirty()
|
||||
{
|
||||
base.ClearVerticesDirty();
|
||||
label.ClearVerticesDirty();
|
||||
itemStyle.ClearVerticesDirty();
|
||||
}
|
||||
|
||||
public override void ClearComponentDirty()
|
||||
{
|
||||
base.ClearComponentDirty();
|
||||
label.ClearComponentDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Component/Emphasis/Emphasis.cs.meta
Normal file
11
Runtime/Component/Emphasis/Emphasis.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6e0b1690532674b24952a87e0aead6fa
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
11
Runtime/Component/Emphasis/EmphasisItemStyle.cs
Normal file
11
Runtime/Component/Emphasis/EmphasisItemStyle.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Runtime
|
||||
{
|
||||
/// <summary>
|
||||
/// 高亮的图形样式
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class EmphasisItemStyle : ItemStyle, ISerieExtraComponent, ISerieDataComponent
|
||||
{ }
|
||||
}
|
||||
11
Runtime/Component/Emphasis/EmphasisItemStyle.cs.meta
Normal file
11
Runtime/Component/Emphasis/EmphasisItemStyle.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d1095175540449f99bb9da27a5aaf04
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
11
Runtime/Component/Emphasis/EmphasisLabelLine.cs
Normal file
11
Runtime/Component/Emphasis/EmphasisLabelLine.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Runtime
|
||||
{
|
||||
/// <summary>
|
||||
/// 高亮的标签引导线样式
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class EmphasisLabelLine : LabelLine, ISerieExtraComponent, ISerieDataComponent
|
||||
{ }
|
||||
}
|
||||
11
Runtime/Component/Emphasis/EmphasisLabelLine.cs.meta
Normal file
11
Runtime/Component/Emphasis/EmphasisLabelLine.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a0d9ff3b8e09d464e9b5ea996b941314
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
11
Runtime/Component/Emphasis/EmphasisLabelStyle.cs
Normal file
11
Runtime/Component/Emphasis/EmphasisLabelStyle.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Runtime
|
||||
{
|
||||
/// <summary>
|
||||
/// 高亮的标签样式
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class EmphasisLabelStyle : LabelStyle, ISerieExtraComponent, ISerieDataComponent
|
||||
{ }
|
||||
}
|
||||
11
Runtime/Component/Emphasis/EmphasisLabelStyle.cs.meta
Normal file
11
Runtime/Component/Emphasis/EmphasisLabelStyle.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3e025b0f4be6d4141aa08bdad0102aa7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user