// < private private void _Init(eReNameType renameType) { AsLanguageManager.Instance.SetFontFromSystemLanguage( m_TextTitle); AsLanguageManager.Instance.SetFontFromSystemLanguage( m_TextDesc); AsLanguageManager.Instance.SetFontFromSystemLanguage( m_BtnOk.spriteText); AsLanguageManager.Instance.SetFontFromSystemLanguage( m_BtnCancel.spriteText); AsLanguageManager.Instance.SetFontFromSystemLanguage( textField); switch( renameType ) { case eReNameType.Character: ApplyControlString_Character(); break; case eReNameType.Guild: ApplyControlString_Guild(); break; case eReNameType.Pet: ApplyControlString_Pet(); break; } m_BtnOk.SetInputDelegate( _BtnDelegate_Ok); m_BtnCancel.SetInputDelegate( _BtnDelegate_Cancel); textField.SetFocusDelegate( _FocusDelegate); textField.SetValidationDelegate( _ValidationDelegate); textField.Text = ""; textField.spriteText.maxWidth = 20.0f; }
public void Open(GameObject goRoot, int nSlotIndex , eReNameType renameType) { m_renameType = renameType; _Init(renameType); gameObject.SetActiveRecursively( true); m_goRoot = goRoot; m_nSlotIndex = nSlotIndex; }