示例#1
0
 // Token: 0x060049C4 RID: 18884 RVA: 0x0011AF7C File Offset: 0x0011917C
 private void OnLocalize(global::Localization loc)
 {
     if (this.isLocalized && this.textLabel != null)
     {
         this.textLabel.text = loc.Get(this.mSelectedItem);
     }
 }
 // Token: 0x06004DCA RID: 19914 RVA: 0x00135D8C File Offset: 0x00133F8C
 private void OnLocalize(global::Localization loc)
 {
     if (this.mLanguage != loc.currentLanguage)
     {
         global::UIWidget component = base.GetComponent <global::UIWidget>();
         global::UILabel  uilabel   = component as global::UILabel;
         global::UISprite uisprite  = component as global::UISprite;
         if (string.IsNullOrEmpty(this.mLanguage) && string.IsNullOrEmpty(this.key) && uilabel != null)
         {
             this.key = uilabel.text;
         }
         string text = (!string.IsNullOrEmpty(this.key)) ? loc.Get(this.key) : loc.Get(component.name);
         if (uilabel != null)
         {
             uilabel.text = text;
         }
         else if (uisprite != null)
         {
             uisprite.spriteName = text;
             uisprite.MakePixelPerfect();
         }
         this.mLanguage = loc.currentLanguage;
     }
 }