public override void OnFill(MeshBuffer m) { if (this.mFont == null) { return; } Color color = (!this.mInvisibleHack ? base.color : Color.clear); this.MakePositionPerfect(); UIWidget.Pivot pivot = base.pivot; int num = m.vSize; if (pivot != UIWidget.Pivot.Left && pivot != UIWidget.Pivot.TopLeft && pivot != UIWidget.Pivot.BottomLeft) { if (pivot == UIWidget.Pivot.Right || pivot == UIWidget.Pivot.TopRight || pivot == UIWidget.Pivot.BottomRight) { UIFont uIFont = this.mFont; string str = this.processedText; bool flag = this.mEncoding; UIFont.SymbolStyle symbolStyle = this.mSymbols; Vector2 vector2 = this.relativeSize; uIFont.Print(str, color, m, flag, symbolStyle, UIFont.Alignment.Right, Mathf.RoundToInt(vector2.x * (float)this.mFont.size), ref this.mSelection, this.mCarratChar, this.mHighlightTextColor, this.mHighlightColor, this.mHighlightChar, this.mHighlightCharSplit); } else { UIFont uIFont1 = this.mFont; string str1 = this.processedText; bool flag1 = this.mEncoding; UIFont.SymbolStyle symbolStyle1 = this.mSymbols; Vector2 vector21 = this.relativeSize; uIFont1.Print(str1, color, m, flag1, symbolStyle1, UIFont.Alignment.Center, Mathf.RoundToInt(vector21.x * (float)this.mFont.size), ref this.mSelection, this.mCarratChar, this.mHighlightTextColor, this.mHighlightColor, this.mHighlightChar, this.mHighlightCharSplit); } } else if (!this.mOverflowRight) { this.mFont.Print(this.processedText, color, m, this.mEncoding, this.mSymbols, UIFont.Alignment.Left, 0, ref this.mSelection, this.mCarratChar, this.mHighlightTextColor, this.mHighlightColor, this.mHighlightChar, this.mHighlightCharSplit); } else { UIFont uIFont2 = this.mFont; string str2 = this.processedText; bool flag2 = this.mEncoding; UIFont.SymbolStyle symbolStyle2 = this.mSymbols; Vector2 vector22 = this.relativeSize; uIFont2.Print(str2, color, m, flag2, symbolStyle2, UIFont.Alignment.LeftOverflowRight, Mathf.RoundToInt(vector22.x * (float)this.mFont.size), ref this.mSelection, this.mCarratChar, this.mHighlightTextColor, this.mHighlightColor, this.mHighlightChar, this.mHighlightCharSplit); } m.ApplyEffect(base.cachedTransform, num, this.effectStyle, this.effectColor, (float)this.mFont.size); }
public override void OnFill(MeshBuffer m) { if (this.mFont != null) { Color normalColor = !this.mInvisibleHack ? base.color : Color.clear; this.MakePositionPerfect(); UIWidget.Pivot pivot = base.pivot; int vSize = m.vSize; switch (pivot) { case UIWidget.Pivot.Left: case UIWidget.Pivot.TopLeft: case UIWidget.Pivot.BottomLeft: if (this.mOverflowRight) { this.mFont.Print(this.processedText, normalColor, m, this.mEncoding, this.mSymbols, UIFont.Alignment.LeftOverflowRight, Mathf.RoundToInt(this.relativeSize.x * this.mFont.size), ref this.mSelection, this.mCarratChar, this.mHighlightTextColor, this.mHighlightColor, this.mHighlightChar, this.mHighlightCharSplit); } else { this.mFont.Print(this.processedText, normalColor, m, this.mEncoding, this.mSymbols, UIFont.Alignment.Left, 0, ref this.mSelection, this.mCarratChar, this.mHighlightTextColor, this.mHighlightColor, this.mHighlightChar, this.mHighlightCharSplit); } break; case UIWidget.Pivot.Right: case UIWidget.Pivot.TopRight: case UIWidget.Pivot.BottomRight: this.mFont.Print(this.processedText, normalColor, m, this.mEncoding, this.mSymbols, UIFont.Alignment.Right, Mathf.RoundToInt(this.relativeSize.x * this.mFont.size), ref this.mSelection, this.mCarratChar, this.mHighlightTextColor, this.mHighlightColor, this.mHighlightChar, this.mHighlightCharSplit); break; default: this.mFont.Print(this.processedText, normalColor, m, this.mEncoding, this.mSymbols, UIFont.Alignment.Center, Mathf.RoundToInt(this.relativeSize.x * this.mFont.size), ref this.mSelection, this.mCarratChar, this.mHighlightTextColor, this.mHighlightColor, this.mHighlightChar, this.mHighlightCharSplit); break; } m.ApplyEffect(base.cachedTransform, vSize, this.effectStyle, this.effectColor, (float)this.mFont.size); } }
public override void OnFill(MeshBuffer m) { if (this.mFont == null) { return; } Color color = (!this.mInvisibleHack ? base.color : Color.clear); this.MakePositionPerfect(); UIWidget.Pivot pivot = base.pivot; int num = m.vSize; if (pivot != UIWidget.Pivot.Left && pivot != UIWidget.Pivot.TopLeft && pivot != UIWidget.Pivot.BottomLeft) { if (pivot == UIWidget.Pivot.Right || pivot == UIWidget.Pivot.TopRight || pivot == UIWidget.Pivot.BottomRight) { UIFont uIFont = this.mFont; string str = this.processedText; bool flag = this.mEncoding; UIFont.SymbolStyle symbolStyle = this.mSymbols; Vector2 vector2 = this.relativeSize; uIFont.Print(str, color, m, flag, symbolStyle, UIFont.Alignment.Right, Mathf.RoundToInt(vector2.x * (float)this.mFont.size), ref this.mSelection, this.mCarratChar, this.mHighlightTextColor, this.mHighlightColor, this.mHighlightChar, this.mHighlightCharSplit); } else { UIFont uIFont1 = this.mFont; string str1 = this.processedText; bool flag1 = this.mEncoding; UIFont.SymbolStyle symbolStyle1 = this.mSymbols; Vector2 vector21 = this.relativeSize; uIFont1.Print(str1, color, m, flag1, symbolStyle1, UIFont.Alignment.Center, Mathf.RoundToInt(vector21.x * (float)this.mFont.size), ref this.mSelection, this.mCarratChar, this.mHighlightTextColor, this.mHighlightColor, this.mHighlightChar, this.mHighlightCharSplit); } } else if (!this.mOverflowRight) { this.mFont.Print(this.processedText, color, m, this.mEncoding, this.mSymbols, UIFont.Alignment.Left, 0, ref this.mSelection, this.mCarratChar, this.mHighlightTextColor, this.mHighlightColor, this.mHighlightChar, this.mHighlightCharSplit); } else { UIFont uIFont2 = this.mFont; string str2 = this.processedText; bool flag2 = this.mEncoding; UIFont.SymbolStyle symbolStyle2 = this.mSymbols; Vector2 vector22 = this.relativeSize; uIFont2.Print(str2, color, m, flag2, symbolStyle2, UIFont.Alignment.LeftOverflowRight, Mathf.RoundToInt(vector22.x * (float)this.mFont.size), ref this.mSelection, this.mCarratChar, this.mHighlightTextColor, this.mHighlightColor, this.mHighlightChar, this.mHighlightCharSplit); } m.ApplyEffect(base.cachedTransform, num, this.effectStyle, this.effectColor, (float)this.mFont.size); }