mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-29 12:48:47 +00:00
删除TextStyle的无用配置项tmpAlignment
This commit is contained in:
@@ -27,14 +27,13 @@ namespace XCharts.Editor
|
|||||||
PropertyField(prop, "m_Color");
|
PropertyField(prop, "m_Color");
|
||||||
PropertyField(prop, "m_FontSize");
|
PropertyField(prop, "m_FontSize");
|
||||||
PropertyField(prop, "m_LineSpacing");
|
PropertyField(prop, "m_LineSpacing");
|
||||||
|
PropertyField(prop, "m_Alignment");
|
||||||
|
PropertyField(prop, "m_AutoAlign");
|
||||||
#if dUI_TextMeshPro
|
#if dUI_TextMeshPro
|
||||||
PropertyField(prop, "m_TMPFontStyle");
|
PropertyField(prop, "m_TMPFontStyle");
|
||||||
PropertyField(prop, "m_TMPSpriteAsset");
|
PropertyField(prop, "m_TMPSpriteAsset");
|
||||||
PropertyField(prop, "m_TMPAlignment");
|
|
||||||
#else
|
#else
|
||||||
PropertyField(prop, "m_FontStyle");
|
PropertyField(prop, "m_FontStyle");
|
||||||
PropertyField(prop, "m_Alignment");
|
|
||||||
PropertyField(prop, "m_AutoAlign");
|
|
||||||
PropertyField(prop, "m_AutoWrap");
|
PropertyField(prop, "m_AutoWrap");
|
||||||
#endif
|
#endif
|
||||||
--EditorGUI.indentLevel;
|
--EditorGUI.indentLevel;
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ namespace XCharts.Runtime
|
|||||||
#if dUI_TextMeshPro
|
#if dUI_TextMeshPro
|
||||||
[SerializeField] private TMP_FontAsset m_TMPFont;
|
[SerializeField] private TMP_FontAsset m_TMPFont;
|
||||||
[SerializeField] private FontStyles m_TMPFontStyle = FontStyles.Normal;
|
[SerializeField] private FontStyles m_TMPFontStyle = FontStyles.Normal;
|
||||||
[SerializeField] private TextAlignmentOptions m_TMPAlignment = TextAlignmentOptions.Left;
|
|
||||||
[SerializeField][Since("v3.1.0")] private TMP_SpriteAsset m_TMPSpriteAsset;
|
[SerializeField][Since("v3.1.0")] private TMP_SpriteAsset m_TMPSpriteAsset;
|
||||||
#endif
|
#endif
|
||||||
public bool show
|
public bool show
|
||||||
@@ -147,15 +146,6 @@ namespace XCharts.Runtime
|
|||||||
set { if (PropertyUtil.SetStruct(ref m_TMPFontStyle, value)) SetComponentDirty(); }
|
set { if (PropertyUtil.SetStruct(ref m_TMPFontStyle, value)) SetComponentDirty(); }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// the text alignment of TextMeshPro.
|
|
||||||
/// ||TextMeshPro字体对齐方式。
|
|
||||||
/// </summary>
|
|
||||||
public TextAlignmentOptions tmpAlignment
|
|
||||||
{
|
|
||||||
get { return m_TMPAlignment; }
|
|
||||||
set { if (PropertyUtil.SetStruct(ref m_TMPAlignment, value)) SetComponentDirty(); }
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// the sprite asset of TextMeshPro.
|
/// the sprite asset of TextMeshPro.
|
||||||
/// ||TextMeshPro的Sprite Asset。
|
/// ||TextMeshPro的Sprite Asset。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -214,11 +204,7 @@ namespace XCharts.Runtime
|
|||||||
|
|
||||||
public void UpdateAlignmentByLocation(Location location)
|
public void UpdateAlignmentByLocation(Location location)
|
||||||
{
|
{
|
||||||
#if dUI_TextMeshPro
|
|
||||||
m_TMPAlignment = location.runtimeTMPTextAlignment;
|
|
||||||
#else
|
|
||||||
m_Alignment = location.runtimeTextAlignment;
|
m_Alignment = location.runtimeTextAlignment;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Color GetColor(Color defaultColor)
|
public Color GetColor(Color defaultColor)
|
||||||
|
|||||||
Reference in New Issue
Block a user