// Token: 0x06004E6E RID: 20078 RVA: 0x00143944 File Offset: 0x00141B44
 protected void Add(string text, bool updateVisible)
 {
     global::UITextList.Paragraph paragraph;
     if (this.mParagraphs.Count < this.maxEntries)
     {
         paragraph = new global::UITextList.Paragraph();
     }
     else
     {
         paragraph = this.mParagraphs[0];
         this.mParagraphs.RemoveAt(0);
     }
     paragraph.text = text;
     this.mParagraphs.Add(paragraph);
     if (this.textLabel != null && this.textLabel.font != null)
     {
         paragraph.lines  = this.textLabel.font.WrapText(global::UIFont.tempMarkup, paragraph.text, this.maxWidth / this.textLabel.transform.localScale.y, this.textLabel.maxLineCount, this.textLabel.supportEncoding, this.textLabel.symbolStyle).Split(this.mSeparator);
         this.mTotalLines = 0;
         int i     = 0;
         int count = this.mParagraphs.Count;
         while (i < count)
         {
             this.mTotalLines += this.mParagraphs[i].lines.Length;
             i++;
         }
     }
     if (updateVisible)
     {
         this.UpdateVisibleText();
     }
 }
 // Token: 0x06004E71 RID: 20081 RVA: 0x00143B70 File Offset: 0x00141D70
 protected void UpdateVisibleText()
 {
     if (this.textLabel != null)
     {
         global::UIFont font = this.textLabel.font;
         if (font != null)
         {
             int num  = 0;
             int num2 = (this.maxHeight <= 0f) ? 100000 : Mathf.FloorToInt(this.maxHeight / this.textLabel.cachedTransform.localScale.y);
             int num3 = Mathf.RoundToInt(this.mScroll);
             if (num2 + num3 > this.mTotalLines)
             {
                 num3         = Mathf.Max(0, this.mTotalLines - num2);
                 this.mScroll = (float)num3;
             }
             if (this.style == global::UITextList.Style.Chat)
             {
                 num3 = Mathf.Max(0, this.mTotalLines - num2 - num3);
             }
             string text  = string.Empty;
             int    i     = 0;
             int    count = this.mParagraphs.Count;
             while (i < count)
             {
                 global::UITextList.Paragraph paragraph = this.mParagraphs[i];
                 int j    = 0;
                 int num4 = paragraph.lines.Length;
                 while (j < num4)
                 {
                     string str = paragraph.lines[j];
                     if (num3 > 0)
                     {
                         num3--;
                     }
                     else
                     {
                         if (text.Length > 0)
                         {
                             text += "\n";
                         }
                         text += str;
                         num++;
                         if (num >= num2)
                         {
                             break;
                         }
                     }
                     j++;
                 }
                 if (num >= num2)
                 {
                     break;
                 }
                 i++;
             }
             this.textLabel.text = text;
         }
     }
 }