微调
This commit is contained in:
@@ -35,6 +35,8 @@ namespace Ichni.UI
|
||||
if (action == null)
|
||||
{
|
||||
Debug.LogError($"在InputActionAsset中未找到名为 '{actionName}' 的Action。");
|
||||
inputActions.Enable();
|
||||
waitingForInputCover.SetActive(false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,12 +48,20 @@ namespace Ichni.UI
|
||||
this.title = title;
|
||||
this.subTitle = subTitle;
|
||||
titleText.gameObject.SetActive(true);
|
||||
titleText.GetComponent<Localize>().SetTerm(title);
|
||||
var titleLoc = titleText.GetComponent<Localize>();
|
||||
if (titleLoc != null)
|
||||
titleLoc.SetTerm(title);
|
||||
else
|
||||
titleText.text = title;
|
||||
|
||||
if (subTitle != "")
|
||||
{
|
||||
subTitleText.gameObject.SetActive(true);
|
||||
subTitleText.GetComponent<Localize>().SetTerm(subTitle);
|
||||
var subLoc = subTitleText.GetComponent<Localize>();
|
||||
if (subLoc != null)
|
||||
subLoc.SetTerm(subTitle);
|
||||
else
|
||||
subTitleText.text = subTitle;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -15,7 +15,15 @@ namespace Ichni.UI
|
||||
{
|
||||
base.SetUp(title, subTitle);
|
||||
|
||||
buttonText.GetComponent<Localize>().SetTerm(textContent);
|
||||
var localize = buttonText.GetComponent<Localize>();
|
||||
if (localize != null)
|
||||
{
|
||||
localize.SetTerm(textContent);
|
||||
}
|
||||
else
|
||||
{
|
||||
buttonText.text = textContent;
|
||||
}
|
||||
|
||||
button.onClick.AddListener(() =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user