UI系统优化
This commit is contained in:
@@ -90,7 +90,7 @@ namespace BaseGames.Dialogue
|
||||
bool hasSpeaker = !string.IsNullOrEmpty(resolvedNameKey);
|
||||
if (_speakerNamePanel != null) _speakerNamePanel.SetActive(hasSpeaker);
|
||||
if (hasSpeaker && _speakerNameText != null)
|
||||
_speakerNameText.text = LocalizationManager.Get(resolvedNameKey, "Dialogue");
|
||||
_speakerNameText.text = LocalizationManager.Get(resolvedNameKey, LocalizationTable.Dialogue);
|
||||
|
||||
// 说话人名称框背景颜色(accentColor):有 actor 时着色,无 actor 时还原默认色
|
||||
if (_speakerNameBackground != null)
|
||||
@@ -145,7 +145,7 @@ namespace BaseGames.Dialogue
|
||||
}
|
||||
else
|
||||
{
|
||||
_dialogueText.text = LocalizationManager.Get(key, "Dialogue");
|
||||
_dialogueText.text = LocalizationManager.Get(key, LocalizationTable.Dialogue);
|
||||
}
|
||||
}
|
||||
IsTyping = false;
|
||||
@@ -200,7 +200,7 @@ namespace BaseGames.Dialogue
|
||||
var (go, btn, lbl) = _choicePool[i];
|
||||
go.SetActive(true);
|
||||
if (lbl != null)
|
||||
lbl.text = LocalizationManager.Get(choices[i].textKey ?? "", "Dialogue");
|
||||
lbl.text = LocalizationManager.Get(choices[i].textKey ?? "", LocalizationTable.Dialogue);
|
||||
if (btn != null)
|
||||
{
|
||||
btn.onClick.RemoveAllListeners();
|
||||
@@ -253,7 +253,7 @@ namespace BaseGames.Dialogue
|
||||
}
|
||||
else
|
||||
{
|
||||
text = LocalizationManager.Get(line.textKey, "Dialogue");
|
||||
text = LocalizationManager.Get(line.textKey, LocalizationTable.Dialogue);
|
||||
}
|
||||
|
||||
// 复用缓存 StringBuilder,避免每行 new 分配;TMP SetText(StringBuilder) 零分配
|
||||
|
||||
Reference in New Issue
Block a user