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
TextSnippet.cs
Go to the documentation of this file.
1using System;
5
6namespace Terraria.UI.Chat
7{
8 // Token: 0x02000730 RID: 1840
9 public class TextSnippet
10 {
11 // Token: 0x06003CE0 RID: 15584 RVA: 0x00237C30 File Offset: 0x00235E30
12 public TextSnippet(string text = "")
13 {
14 if (!true)
15 {
16 }
17 this.Color = 1;
18 this.CheckForHover = 16256 != 0;
19 base..ctor();
22 }
23
24 // Token: 0x06003CE1 RID: 15585 RVA: 0x00237C68 File Offset: 0x00235E68
25 public TextSnippet(string text, Color color, float scale = 1f)
26 {
27 if (!true)
28 {
29 }
30 this.Color = 1;
31 this.CheckForHover = 16256 != 0;
32 base..ctor();
35 this.Color = color;
36 }
37
38 // Token: 0x06003CE2 RID: 15586 RVA: 0x00237CA8 File Offset: 0x00235EA8
39 public virtual void Update()
40 {
41 }
42
43 // Token: 0x06003CE3 RID: 15587 RVA: 0x00237CB8 File Offset: 0x00235EB8
44 public virtual void OnHover()
45 {
46 }
47
48 // Token: 0x06003CE4 RID: 15588 RVA: 0x00237CC8 File Offset: 0x00235EC8
49 public virtual void OnClick()
50 {
51 }
52
53 // Token: 0x06003CE5 RID: 15589 RVA: 0x00237CD8 File Offset: 0x00235ED8
54 public virtual Color GetVisibleColor()
55 {
56 Color color = this.Color;
57 if (!true)
58 {
59 }
61 return 1;
62 }
63
64 // Token: 0x06003CE6 RID: 15590 RVA: 0x00237CF8 File Offset: 0x00235EF8
65 public virtual bool UniqueDraw(bool justCheckingString, [Out] Vector2 size, SpriteBatch spriteBatch, [Optional] Vector2 position, [Optional] Color color, float scale = 1f)
66 {
67 /*
68An exception occurred when decompiling this method (06003CE6)
69
70ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.UI.Chat.TextSnippet::UniqueDraw(System.Boolean,Microsoft.Xna.Framework.Vector2,Microsoft.Xna.Framework.Graphics.SpriteBatch,Microsoft.Xna.Framework.Vector2,Microsoft.Xna.Framework.Graphics.Color,System.Single)
71
72 ---> System.Exception: Basic block has to end with unconditional control flow.
73{
74 IL_0006:
75 stfld:float32(Vector2::X, ldloc:Vector2[exp:valuetype Microsoft.Xna.Framework.Vector2&](size), ldc.i4:int32[exp:float32](1))
76}
77
78 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
79 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
80 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
81 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
82 --- End of inner exception stack trace ---
83 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
84 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
85*/;
86 }
87
88 // Token: 0x06003CE7 RID: 15591 RVA: 0x00237D14 File Offset: 0x00235F14
89 public virtual TextSnippet CopyMorph(string newText)
90 {
91 if (base.MemberwiseClone() != null)
92 {
93 }
94 throw new InvalidCastException();
95 }
96
97 // Token: 0x06003CE8 RID: 15592 RVA: 0x00237D30 File Offset: 0x00235F30
98 public virtual float GetStringLength(SpriteFont font)
99 {
100 /*
101An exception occurred when decompiling this method (06003CE8)
102
103ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.UI.Chat.TextSnippet::GetStringLength(Microsoft.Xna.Framework.Graphics.SpriteFont)
104
105 ---> System.Exception: Basic block has to end with unconditional control flow.
106{
107 Block_0:
108 stloc:string(var_0_06, ldfld:string(TextSnippet::Text, ldloc:TextSnippet(this)))
109 stloc:Vector2(var_1_0E, call:Vector2(SpriteFont::MeasureString, ldloc:SpriteFont(font), ldloc:string(var_0_06)))
110 stloc:float32(var_2_15, ldfld:float32(TextSnippet::Scale, ldloc:TextSnippet(this)))
111}
112
113 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
114 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
115 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
116 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
117 --- End of inner exception stack trace ---
118 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
119 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
120*/;
121 }
122
123 // Token: 0x06003CE9 RID: 15593 RVA: 0x00237D54 File Offset: 0x00235F54
124 public override string ToString()
125 {
126 string text = this.Text;
127 string textOriginal = this.TextOriginal;
128 return "Text: " + text + " | OriginalText: " + textOriginal;
129 }
130
131 // Token: 0x04007BED RID: 31725
132 public string Text;
133
134 // Token: 0x04007BEE RID: 31726
135 public string TextOriginal;
136
137 // Token: 0x04007BEF RID: 31727
138 public Color Color;
139
140 // Token: 0x04007BF0 RID: 31728
141 public float Scale;
142
143 // Token: 0x04007BF1 RID: 31729
144 public bool CheckForHover;
145
146 // Token: 0x04007BF2 RID: 31730
147 public bool DeleteWhole;
148 }
149}
class f__AnonymousType0<< Count > j__TPar
static Color WaveColor(Color color)
virtual Color GetVisibleColor()
virtual TextSnippet CopyMorph(string newText)
TextSnippet(string text="")
virtual float GetStringLength(SpriteFont font)
TextSnippet(string text, Color color, float scale=1f)
virtual bool UniqueDraw(bool justCheckingString, [Out] Vector2 size, SpriteBatch spriteBatch, [Optional] Vector2 position, [Optional] Color color, float scale=1f)
override string ToString()