terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
WrappedTextBuilder.cs
Go to the documentation of this file.
1using System;
3using System.Text;
5
6namespace ReLogic.Text
7{
8 // Token: 0x02000B18 RID: 2840
9 public class WrappedTextBuilder
10 {
11 // Token: 0x06005321 RID: 21281 RVA: 0x00283FEC File Offset: 0x002821EC
12 public WrappedTextBuilder(SpriteFont font, float maxWidth, CultureInfo culture)
13 {
14 this._font = font;
16 }
17
18 // Token: 0x06005322 RID: 21282 RVA: 0x00284010 File Offset: 0x00282210
30
31 // Token: 0x06005323 RID: 21283 RVA: 0x00284058 File Offset: 0x00282258
33 {
34 if (this._workingLine.Length != 0)
35 {
36 SpriteFont font = this._font;
38 float width = textToken.Width;
39 float widthOnNewLine = textToken.WidthOnNewLine;
40 float <Spacing>k__BackingField = font.<Spacing>k__BackingField;
41 return;
42 }
43 float widthOnNewLine2 = textToken.WidthOnNewLine;
44 float maxWidth = this._maxWidth;
45 if (this._workingLine.Length != 0)
46 {
47 this.CommitWorkingLine();
48 }
49 float maxWidth2 = this._maxWidth;
50 string text;
51 this.Append(text);
52 }
53
54 // Token: 0x06005324 RID: 21284 RVA: 0x00284120 File Offset: 0x00282320
55 public void Append(string text)
56 {
58 long num = 0L;
60 int stringLength = text._stringLength;
61 int num2 = completedText.EnsureCapacity((int)num);
62 this.CommitWorkingLine();
63 }
64
65 // Token: 0x06005325 RID: 21285 RVA: 0x00284164 File Offset: 0x00282364
66 public override string ToString()
67 {
68 if (this._completedText.Length != 0)
69 {
71 if (this._workingLine != null)
72 {
73 }
74 }
75 string text;
76 return text;
77 }
78
79 // Token: 0x04008AF5 RID: 35573
81
82 // Token: 0x04008AF6 RID: 35574
84
85 // Token: 0x04008AF7 RID: 35575
86 private readonly float _maxWidth;
87
88 // Token: 0x04008AF8 RID: 35576
90
91 // Token: 0x04008AF9 RID: 35577
93
94 // Token: 0x04008AFA RID: 35578
95 private float _workingLineWidth;
96
97 // Token: 0x02000B19 RID: 2841
98 private struct NonBreakingText
99 {
100 // Token: 0x06005326 RID: 21286 RVA: 0x00284190 File Offset: 0x00282390
101 public NonBreakingText(SpriteFont font, string text)
102 {
103 int num = 1;
104 this.Text = text;
105 this.IsWhitespace = num != 0;
106 this._font = font;
107 int stringLength = text._stringLength;
108 long num2 = 0L;
109 char c = text[(int)num2];
111 if (num2 != 0L)
112 {
113 float <Spacing>k__BackingField = font.<Spacing>k__BackingField;
114 return;
115 }
116 if (stringLength == 0)
117 {
118 }
119 char c2 = text[(int)num2];
120 int stringLength2 = text._stringLength;
121 }
122
123 // Token: 0x06005327 RID: 21287 RVA: 0x002841FC File Offset: 0x002823FC
124 public string GetAsWrappedText(float maxWidth)
125 {
126 long num = 0L;
127 char c;
128 SpriteFont.Glyph characterMetrics = this._font.GetCharacterMetrics(c);
129 SpriteFont font;
130 if (num != 0L)
131 {
132 font = this._font;
133 float <Spacing>k__BackingField = font.<Spacing>k__BackingField;
134 }
135 if (font == null)
136 {
137 }
138 if (font == null)
139 {
140 return;
141 }
142 }
143
144 // Token: 0x04008AFB RID: 35579
145 public readonly string Text;
146
147 // Token: 0x04008AFC RID: 35580
148 public readonly float Width;
149
150 // Token: 0x04008AFD RID: 35581
152
153 // Token: 0x04008AFE RID: 35582
155
156 // Token: 0x04008AFF RID: 35583
158 }
159 }
160}
class f__AnonymousType0<< Count > j__TPar
SpriteFont.Glyph GetCharacterMetrics(char character)
readonly StringBuilder _workingLine
void Append(WrappedTextBuilder.NonBreakingText textToken)
readonly StringBuilder _completedText
WrappedTextBuilder(SpriteFont font, float maxWidth, CultureInfo culture)
StringBuilder Append(char value, int repeatCount)