public virtual void Add(ListItem item)
 {
     if (this.bLabelScroll)
     {
         char[] separator = new char[]
         {
             '\n'
         };
         string[] array = item.GetColumnStr(0).Split(separator);
         for (int i = 0; i < array.Length; i++)
         {
             GameObject gameObject = new GameObject("ListItem");
             FlashLabel flashLabel = gameObject.AddComponent <FlashLabel>();
             flashLabel.FontSize   = (float)((int)this.m_faFontSize[0]);
             flashLabel.FontEffect = this.fontEffect;
             flashLabel.FontColor  = string.Empty;
             flashLabel.anchor     = this.columnTextAnchor[0];
             flashLabel.width      = this.viewableArea.x - 20f;
             if (null != base.GetItem(this.startIndex))
             {
                 base.RemoveItemDonotPositionUpdate(this.startIndex, true);
                 flashLabel.SetFlashLabel(array[i]);
                 base.InsertItemDonotPosionUpdate(flashLabel, this.startIndex, null, true);
             }
             else
             {
                 flashLabel.SetFlashLabel(array[i]);
                 base.InsertItemDonotPosionUpdate(flashLabel, this.startIndex, null, true);
             }
             this.startIndex++;
         }
     }
     else if (this.m_bReserve)
     {
         if (this.items.Count == 0)
         {
             this.MakeContainer(item);
         }
         else
         {
             this.reserveItems.Enqueue(item);
         }
     }
     else
     {
         this.MakeContainer(item);
     }
 }
Exemple #2
0
 public void SetScrollLabel(string text)
 {
     this.clipWhenMoving = true;
     base.ClearList(true);
     char[] separator = new char[]
     {
         '\n'
     };
     string[] array = text.Split(separator);
     for (int i = 0; i < array.Length; i++)
     {
         GameObject gameObject = new GameObject("ScrollLabel" + i);
         FlashLabel flashLabel = gameObject.AddComponent <FlashLabel>();
         flashLabel.FontSize   = (float)this.fontSize;
         flashLabel.FontEffect = this.fontEffect;
         flashLabel.FontColor  = this.colorText;
         flashLabel.anchor     = this.anchorPos;
         flashLabel.width      = this.viewableArea.x - 20f;
         flashLabel.SetFlashLabel(array[i]);
         base.InsertItemDonotPosionUpdate(flashLabel, i, null, true);
     }
     this.RepositionItems();
     this.clipWhenMoving = true;
 }