mirror of
https://github.com/FriendshipIsEpic/FiE-Game.git
synced 2024-11-27 15:57:59 +01:00
30 lines
806 B
C#
30 lines
806 B
C#
|
using Fie.Manager;
|
||
|
using GameDataEditor;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace Fie.UI
|
||
|
{
|
||
|
public class FieUIConstantText : FieUITextMeshProObject
|
||
|
{
|
||
|
[SerializeField]
|
||
|
private string _constantTextDataKey;
|
||
|
|
||
|
private void Start()
|
||
|
{
|
||
|
InitializeText();
|
||
|
}
|
||
|
|
||
|
public override void InitializeText()
|
||
|
{
|
||
|
if (_constantTextDataKey != null && !(_tmpTextObject == null))
|
||
|
{
|
||
|
GDEConstantTextListData constantTextData;
|
||
|
string constantText = FieLocalizeUtility.GetConstantText(_constantTextDataKey, out constantTextData);
|
||
|
_tmpTextObject.font = ((!constantTextData.ForceEnableToUseEnglishFont) ? FieManagerBehaviour<FieEnvironmentManager>.I.currentFont : FieManagerBehaviour<FieEnvironmentManager>.I.englishFont);
|
||
|
_tmpTextObject.text = constantText;
|
||
|
_tmpTextObject.ForceMeshUpdate();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|