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
UIText.cs
Go to the documentation of this file.
1using System;
6using Terraria.UI;
8
10{
11 // Token: 0x02000ACE RID: 2766
12 public class UIText : UIElement
13 {
14 // Token: 0x170008CF RID: 2255
15 // (get) Token: 0x0600515C RID: 20828 RVA: 0x002803F0 File Offset: 0x0027E5F0
16 public string Text
17 {
18 get
19 {
20 /*
21An exception occurred when decompiling this method (0600515C)
22
23ICSharpCode.Decompiler.DecompilerException: Error decompiling System.String Terraria.GameContent.UI.Elements.UIText::get_Text()
24
25 ---> System.Exception: Basic block has to end with unconditional control flow.
26{
27 Block_0:
28 stloc:object(var_0_06, ldfld:object(UIText::_text, ldloc:UIText(this)))
29}
30
31 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
32 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
33 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
34 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
35 --- End of inner exception stack trace ---
36 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
37 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
38*/;
39 }
40 }
41
42 // Token: 0x170008D0 RID: 2256
43 // (get) Token: 0x0600515D RID: 20829 RVA: 0x00280404 File Offset: 0x0027E604
44 // (set) Token: 0x0600515E RID: 20830 RVA: 0x00280418 File Offset: 0x0027E618
45 public float TextOriginX
46 {
48 get
49 {
50 /*
51An exception occurred when decompiling this method (0600515D)
52
53ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.GameContent.UI.Elements.UIText::get_TextOriginX()
54
55 ---> System.Exception: Basic block has to end with unconditional control flow.
56{
57 Block_0:
58 stloc:float32(var_0_06, ldfld:float32(UIText::<TextOriginX>k__BackingField, ldloc:UIText(this)))
59}
60
61 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
62 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
63 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
64 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
65 --- End of inner exception stack trace ---
66 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
67 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
68*/;
69 }
71 set
72 {
73 }
74 }
75
76 // Token: 0x170008D1 RID: 2257
77 // (get) Token: 0x0600515F RID: 20831 RVA: 0x00280428 File Offset: 0x0027E628
78 // (set) Token: 0x06005160 RID: 20832 RVA: 0x0028043C File Offset: 0x0027E63C
79 public float TextOriginY
80 {
82 get
83 {
84 /*
85An exception occurred when decompiling this method (0600515F)
86
87ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.GameContent.UI.Elements.UIText::get_TextOriginY()
88
89 ---> System.Exception: Basic block has to end with unconditional control flow.
90{
91 Block_0:
92 stloc:float32(var_0_06, ldfld:float32(UIText::<TextOriginY>k__BackingField, ldloc:UIText(this)))
93}
94
95 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
96 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
97 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
98 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
99 --- End of inner exception stack trace ---
100 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
101 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
102*/;
103 }
105 set
106 {
107 }
108 }
109
110 // Token: 0x170008D2 RID: 2258
111 // (get) Token: 0x06005161 RID: 20833 RVA: 0x0028044C File Offset: 0x0027E64C
112 // (set) Token: 0x06005162 RID: 20834 RVA: 0x00280460 File Offset: 0x0027E660
114 {
116 get
117 {
118 /*
119An exception occurred when decompiling this method (06005161)
120
121ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.GameContent.UI.Elements.UIText::get_WrappedTextBottomPadding()
122
123 ---> System.Exception: Basic block has to end with unconditional control flow.
124{
125 Block_0:
126 stloc:float32(var_0_06, ldfld:float32(UIText::<WrappedTextBottomPadding>k__BackingField, ldloc:UIText(this)))
127}
128
129 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
130 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
131 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
132 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
133 --- End of inner exception stack trace ---
134 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
135 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
136*/;
137 }
139 set
140 {
141 }
142 }
143
144 // Token: 0x170008D3 RID: 2259
145 // (get) Token: 0x06005163 RID: 20835 RVA: 0x00280470 File Offset: 0x0027E670
146 // (set) Token: 0x06005164 RID: 20836 RVA: 0x00280484 File Offset: 0x0027E684
147 public bool IsWrapped
148 {
149 get
150 {
151 return this._isWrapped;
152 }
153 set
154 {
155 object text = this._text;
156 float textScale = this._textScale;
157 bool isLarge = this._isLarge;
158 }
159 }
160
161 // Token: 0x14000065 RID: 101
162 // (add) Token: 0x06005165 RID: 20837 RVA: 0x002804A8 File Offset: 0x0027E6A8
163 // (remove) Token: 0x06005166 RID: 20838 RVA: 0x002804CC File Offset: 0x0027E6CC
165 {
167 add
168 {
169 if (Delegate.Combine(this.OnInternalTextChange, value) != null)
170 {
171 }
172 }
174 remove
175 {
176 if (Delegate.Remove(this.OnInternalTextChange, value) != null)
177 {
178 }
179 }
180 }
181
182 // Token: 0x170008D4 RID: 2260
183 // (get) Token: 0x06005167 RID: 20839 RVA: 0x002804F0 File Offset: 0x0027E6F0
184 // (set) Token: 0x06005168 RID: 20840 RVA: 0x00280500 File Offset: 0x0027E700
186 {
187 get
188 {
189 Color color;
190 return color;
191 }
192 set
193 {
194 }
195 }
196
197 // Token: 0x170008D5 RID: 2261
198 // (get) Token: 0x06005169 RID: 20841 RVA: 0x00280510 File Offset: 0x0027E710
199 // (set) Token: 0x0600516A RID: 20842 RVA: 0x00280520 File Offset: 0x0027E720
201 {
202 get
203 {
204 Color color;
205 return color;
206 }
207 set
208 {
209 }
210 }
211
212 // Token: 0x0600516B RID: 20843 RVA: 0x00280530 File Offset: 0x0027E730
213 public UIText(string text, float textScale = 1f, bool large = false)
214 {
215 int num = 16256;
216 this._textScale = (float)num;
217 this._text = "";
218 if ("" == null)
219 {
220 }
221 if (!true)
222 {
223 }
224 base..ctor();
225 object text2 = this._text;
226 float textScale2 = this._textScale;
227 bool isLarge = this._isLarge;
228 this.InternalSetText(text2, textScale, isLarge);
229 int num2 = 16800;
231 this.InternalSetText(text, textScale, isLarge);
232 }
233
234 // Token: 0x0600516C RID: 20844 RVA: 0x0028059C File Offset: 0x0027E79C
235 public UIText(LocalizedText text, float textScale = 1f, bool large = false)
236 {
237 int num = 16256;
238 this._textScale = (float)num;
239 this._text = "";
240 if ("" == null)
241 {
242 }
243 if (!true)
244 {
245 }
246 base..ctor();
247 object text2 = this._text;
248 float textScale2 = this._textScale;
249 bool isLarge = this._isLarge;
250 this.InternalSetText(text2, textScale, isLarge);
251 int num2 = 16800;
253 this.InternalSetText(text, textScale, isLarge);
254 }
255
256 // Token: 0x0600516D RID: 20845 RVA: 0x00280608 File Offset: 0x0027E808
257 public override void Recalculate()
258 {
259 object text = this._text;
260 float textScale = this._textScale;
261 bool isLarge = this._isLarge;
262 base.Recalculate();
263 }
264
265 // Token: 0x0600516E RID: 20846 RVA: 0x00280630 File Offset: 0x0027E830
266 public void SetText(string text)
267 {
268 float textScale = this._textScale;
269 bool isLarge = this._isLarge;
270 }
271
272 // Token: 0x0600516F RID: 20847 RVA: 0x0028064C File Offset: 0x0027E84C
274 {
275 float textScale = this._textScale;
276 bool isLarge = this._isLarge;
277 }
278
279 // Token: 0x06005170 RID: 20848 RVA: 0x00280668 File Offset: 0x0027E868
280 public void SetText(string text, float textScale, bool large)
281 {
282 this.InternalSetText(text, textScale, large);
283 }
284
285 // Token: 0x06005171 RID: 20849 RVA: 0x00280680 File Offset: 0x0027E880
286 public void SetText(LocalizedText text, float textScale, bool large)
287 {
288 this.InternalSetText(text, textScale, large);
289 }
290
291 // Token: 0x06005172 RID: 20850 RVA: 0x00280698 File Offset: 0x0027E898
292 protected override void DrawSelf(SpriteBatch spriteBatch)
293 {
294 base.DrawSelf(spriteBatch);
295 this.VerifyTextState();
296 float x = this._innerDimensions.X;
297 bool isLarge = this._isLarge;
298 float num = this.<TextOriginX>k__BackingField;
300 if (dynamicallyScaleDownToWidth)
301 {
302 }
304 {
305 }
306 string visibleText = this._visibleText;
307 Color color = this._color;
308 if (!dynamicallyScaleDownToWidth)
309 {
310 }
311 int num2 = 17279;
312 if (num2 == 0)
313 {
314 }
315 string visibleText2 = this._visibleText;
316 if (num2 == 0)
317 {
318 }
321 }
322
323 // Token: 0x06005173 RID: 20851 RVA: 0x00280714 File Offset: 0x0027E914
324 private void VerifyTextState()
325 {
326 object text = this._text;
328 object text2 = this._text;
329 float textScale = this._textScale;
330 bool isLarge = this._isLarge;
331 }
332
333 // Token: 0x06005174 RID: 20852 RVA: 0x00280748 File Offset: 0x0027E948
334 private void InternalSetText(object text, float textScale, bool large)
335 {
336 if (!true)
337 {
338 }
340 bool isWrapped = this._isWrapped;
342 float width;
343 if (isWrapped)
344 {
345 width = this._innerDimensions.Width;
346 float textScale2 = this._textScale;
347 }
348 string text2;
349 this._visibleText = text2;
350 if (this._isWrapped)
351 {
353 return;
354 }
355 if (16896 == 0)
356 {
357 }
358 float paddingLeft = this.PaddingLeft;
359 float paddingRight = this.PaddingRight;
360 this._textSize.X = width;
361 float paddingTop = this.PaddingTop;
362 float paddingBottom = this.PaddingBottom;
364 if (onInternalTextChange != null)
365 {
366 IntPtr invoke_impl = onInternalTextChange.invoke_impl;
367 IntPtr method_code = onInternalTextChange.method_code;
368 IntPtr method = onInternalTextChange.method;
369 }
370 }
371
372 // Token: 0x040089ED RID: 35309
373 private object _text;
374
375 // Token: 0x040089EE RID: 35310
376 private float _textScale;
377
378 // Token: 0x040089EF RID: 35311
380
381 // Token: 0x040089F0 RID: 35312
382 private bool _isLarge;
383
384 // Token: 0x040089F1 RID: 35313
385 private Color _color;
386
387 // Token: 0x040089F2 RID: 35314
389
390 // Token: 0x040089F3 RID: 35315
391 private bool _isWrapped;
392
393 // Token: 0x040089F4 RID: 35316
395 private float <TextOriginX>k__BackingField;
396
397 // Token: 0x040089F5 RID: 35317
399 private float <TextOriginY>k__BackingField;
400
401 // Token: 0x040089F6 RID: 35318
403 private float <WrappedTextBottomPadding>k__BackingField;
404
405 // Token: 0x040089F7 RID: 35319
407
408 // Token: 0x040089F8 RID: 35320
409 private string _visibleText;
410
411 // Token: 0x040089F9 RID: 35321
412 private string _lastTextReference;
413
414 // Token: 0x040089FA RID: 35322
417 }
418}
class f__AnonymousType0<< Count > j__TPar
static Delegate Combine(Delegate a, Delegate b)
Definition Delegate.cs:255
static Delegate Remove(Delegate source, Delegate value)
Definition Delegate.cs:278
float< WrappedTextBottomPadding > k__BackingField
Definition UIText.cs:403
void SetText(string text, float textScale, bool large)
Definition UIText.cs:280
UIText(string text, float textScale=1f, bool large=false)
Definition UIText.cs:213
void InternalSetText(object text, float textScale, bool large)
Definition UIText.cs:334
override void DrawSelf(SpriteBatch spriteBatch)
Definition UIText.cs:292
float< TextOriginX > k__BackingField
Definition UIText.cs:395
float< TextOriginY > k__BackingField
Definition UIText.cs:399
UIText(LocalizedText text, float textScale=1f, bool large=false)
Definition UIText.cs:235
void SetText(LocalizedText text)
Definition UIText.cs:273
void SetText(LocalizedText text, float textScale, bool large)
Definition UIText.cs:286
static void ConvertNormalSnippets(TextSnippet[] snippets)
CalculatedStyle _innerDimensions