修复TextLimit在开启TextMeshPro后无效的问题 (#301)

This commit is contained in:
monitor1394
2024-01-27 13:40:16 +08:00
parent c987cb1ef7
commit bc75865a5e

View File

@@ -299,11 +299,6 @@ namespace XCharts.Runtime
public string GetPreferredText(string content, string suffix, float maxWidth)
{
#if dUI_TextMeshPro
if (m_TMPText != null) return content; // TODO:
#else
if (m_Text != null)
{
var sourWid = GetPreferredWidth(content);
if (sourWid < maxWidth) return content;
var suffixWid = GetPreferredWidth(suffix);
@@ -316,8 +311,6 @@ namespace XCharts.Runtime
return temp + suffix;
}
}
}
#endif
return string.Empty;
}