Exemple #1
0
 protected override void Awake()
 {
     base.Awake();
     m_realKey       = base.m_Text;
     m_defaultConfig = new TextLangConfig {
         font = this.font, fontSize = this.fontSize
     };
     if (LocalzationMgr.IsInit)
     {
         LocalzationMgr.instance.AddItem(this);
         OnLangChange(LocalzationMgr.instance.CurLang);
     }
 }
Exemple #2
0
    private void SetConfig(LanguageEnum languageEnum)
    {
        TextLangConfig config = m_defaultConfig;

        if (textLangConfigDic != null)
        {
            TextLangConfig langConfig = null;
            textLangConfigDic.TryGetValue((int)languageEnum, out langConfig);
            config = langConfig ?? config;
        }
        if (config != null)
        {
            this.fontSize = config.fontSize;
            this.font     = config.font;
        }
    }