Update Setting
This commit is contained in:
@@ -21,6 +21,28 @@ namespace Hallucinate.UI
|
||||
|
||||
if (_confirmBtn != null)
|
||||
_confirmBtn.clicked += OnConfirmClicked;
|
||||
|
||||
// Đăng ký Localization
|
||||
if (LocalizationManager.Instance != null)
|
||||
{
|
||||
LocalizationManager.Instance.OnLanguageChanged += ApplyLocalization;
|
||||
}
|
||||
ApplyLocalization();
|
||||
}
|
||||
|
||||
private void ApplyLocalization()
|
||||
{
|
||||
if (LocalizationManager.Instance == null) return;
|
||||
|
||||
var title = root.Q<Label>(className: "text-heading");
|
||||
if (title != null) title.text = LocalizationManager.Instance.GetLocalizedString("LOGIN_TITLE");
|
||||
|
||||
if (_nameInput != null) _nameInput.label = LocalizationManager.Instance.GetLocalizedString("LOGIN_USER");
|
||||
if (_confirmBtn != null) _confirmBtn.text = LocalizationManager.Instance.GetLocalizedString("LOGIN_BTN");
|
||||
|
||||
var guestBtn = root.Q<Button>("GuestBtn");
|
||||
if (guestBtn != null) guestBtn.text = LocalizationManager.Instance.GetLocalizedString("LOGIN_GUEST");
|
||||
|
||||
}
|
||||
|
||||
private async void OnConfirmClicked()
|
||||
|
||||
Reference in New Issue
Block a user