Merge branch 'dev_lishuo' into dev_cyp

# Conflicts:
#	Assets/Resources/UI/Prefab/Panel/Mobile/DevicePanel.prefab
#	Assets/Scenes/Login-Mobile.unity
#	Assets/Scenes/Login.unity
#	Assets/Scripts/App.cs
#	Assets/Scripts/Editor.meta
#	Assets/Scripts/Scenes/Ride/Scripts/CyclingController.cs
This commit is contained in:
Caiyanpeng committed 2021-11-23 09:51:10 +08:00
commit 190a66bb68
89 files changed
+9195 -1628

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@ namespace Assets.Scripts.UI.Control
isSelected = false;
this.mInnerInputField.OnDeselect(eventData);
transform.Find("Placeholder").GetComponent<Text>().text = placeHolderText;
transform.Find("Placeholder").GetComponent<Text>().text = App.GetLocalString(placeHolderText);
//var image = this.transform.GetComponent<Image>();
//var png1 = Resources.Load<Sprite>("Images/ipt-0");
//image.sprite = png1;
+23
View File
@@ -11,6 +11,7 @@ namespace Assets.Scripts.UI.Control
[RequireComponent(typeof(Text))]
public class PFUIText : PFUIComponentBase
{
public string key;
private Text text;
public string Text
@@ -27,6 +28,28 @@ namespace Assets.Scripts.UI.Control
protected void Awake()
{
text = this.transform.GetComponent<Text>();
if (string.IsNullOrEmpty(key))
{
key = text.text;//默认英文内容为key值
}
}
protected void Start()
{
Debug.Log(text.text);
if (App.LanguageManager != null && App.LanguageManager.ContainsKey(key))
{
Debug.Log(text.text);
text.text = App.LanguageManager[key];
}
App.ChangeLanguageEvent += App_ChangeLanguageEvent;
}
private void App_ChangeLanguageEvent()
{
if (App.LanguageManager != null && App.LanguageManager.ContainsKey(text.text))
{
text.text = App.LanguageManager[key];
}
}
}
}