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
GUIResearchPage.cs
Go to the documentation of this file.
1using System;
5using Terraria;
7using Terraria.UI;
8
9// Token: 0x0200016C RID: 364
10public class GUIResearchPage
11{
12 // Token: 0x06000A44 RID: 2628 RVA: 0x000313C8 File Offset: 0x0002F5C8
19
20 // Token: 0x17000109 RID: 265
21 // (get) Token: 0x06000A45 RID: 2629 RVA: 0x000313E4 File Offset: 0x0002F5E4
22 public bool Collapsed
23 {
24 get
25 {
26 if (!true)
27 {
28 }
30 }
31 }
32
33 // Token: 0x06000A46 RID: 2630 RVA: 0x00031404 File Offset: 0x0002F604
34 public int ReforgeCost()
35 {
36 return this.refCost;
37 }
38
39 // Token: 0x06000A47 RID: 2631 RVA: 0x00031418 File Offset: 0x0002F618
40 public void Reset()
41 {
42 if (!true)
43 {
44 }
45 if (!true)
46 {
47 }
49 }
50
51 // Token: 0x06000A48 RID: 2632 RVA: 0x000021DB File Offset: 0x000003DB
52 private void RefreshItems()
53 {
54 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
55 }
56
57 // Token: 0x1700010A RID: 266
58 // (get) Token: 0x06000A49 RID: 2633 RVA: 0x00031434 File Offset: 0x0002F634
59 public bool HasFocus
60 {
61 get
62 {
64 return true;
65 }
66 }
67
68 // Token: 0x06000A4A RID: 2634 RVA: 0x0003144C File Offset: 0x0002F64C
69 public void DrawResearch()
70 {
72 string textValue = Language.GetTextValue("Mobile.Research");
73 }
74
75 // Token: 0x06000A4B RID: 2635 RVA: 0x0003151C File Offset: 0x0002F71C
76 public void Draw()
77 {
78 int num = 1;
79 this.RefreshItems();
80 if (num == 0)
81 {
82 }
83 if (num == 0)
84 {
85 }
86 int num2 = 255;
88 string textValue = Language.GetTextValue("Mobile.Research");
89 if (num2 == 0)
90 {
91 }
93 int selectedItem = this._selectedItem;
94 int size = researchItems._size;
95 this.cursorOver = size;
98 if (selectedItem == 0)
99 {
100 }
102 if (rectangle == null)
103 {
104 }
105 int mouseX = Main.mouseX;
106 int mouseY = Main.mouseY;
108 int size2 = this._researchItems._size;
110 {
111 }
113 if (draggableItemGrid_Layout != null)
114 {
117 }
118 }
119
120 // Token: 0x1700010B RID: 267
121 // (get) Token: 0x06000A4C RID: 2636 RVA: 0x000315C4 File Offset: 0x0002F7C4
123 {
124 get
125 {
126 /*
127An exception occurred when decompiling this method (06000A4C)
128
129ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.Item GUIResearchPage::get_ResearchItem()
130
131 ---> System.Exception: Basic block has to end with unconditional control flow.
132{
133 IL_0003:
134 stloc:int32(var_1_0A, callgetter:int32(Main::get_myPlayer))
135 stloc:class [mscorlib]System.Collections.Generic.List`1<int32>(var_2_11, ldfld:class [mscorlib]System.Collections.Generic.List`1<int32>(GUIResearchPage::_researchItems, ldloc:GUIResearchPage(this)))
136 stloc:int32(var_3_18, ldfld:int32(GUIResearchPage::_selectedItem, ldloc:GUIResearchPage(this)))
137 stloc:int32(var_4_1F, ldfld:int32(List`1::_size, ldloc:class [mscorlib]System.Collections.Generic.List`1<int32>[exp:List`1](var_2_11)))
138}
139
140 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
141 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
142 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
143 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
144 --- End of inner exception stack trace ---
145 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
146 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
147*/;
148 }
149 }
150
151 // Token: 0x06000A4D RID: 2637 RVA: 0x000315F4 File Offset: 0x0002F7F4
152 public float ResearchItemScale(int index)
153 {
154 /*
155An exception occurred when decompiling this method (06000A4D)
156
157ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single GUIResearchPage::ResearchItemScale(System.Int32)
158
159 ---> System.Exception: Basic block has to end with unconditional control flow.
160{
161 Block_0:
162 stloc:!0(var_0_05, callgetter:!0(PageControllerLayoutDefinition`1::get_Instance))
163}
164
165 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
166 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
167 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
168 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
169 --- End of inner exception stack trace ---
170 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
171 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
172*/;
173 }
174
175 // Token: 0x06000A4E RID: 2638 RVA: 0x00031608 File Offset: 0x0002F808
176 public void ResearchItemOver(int index)
177 {
179 int size = this._researchItems._size;
180 if (size == 0)
181 {
182 }
183 int myPlayer = Main.myPlayer;
185 if (size == 0)
186 {
187 }
188 bool mouseLeft = Main.mouseLeft;
189 if (size == 0)
190 {
191 }
192 bool mouseLeftRelease = Main.mouseLeftRelease;
193 int selectedItem = this._selectedItem;
195 if (index != 0)
196 {
197 int selectedItem2 = this._selectedItem;
200 }
201 }
202
203 // Token: 0x06000A4F RID: 2639 RVA: 0x0003167C File Offset: 0x0002F87C
204 public void ResearchItemDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
205 {
206 if (!true)
207 {
208 }
209 Main.inventoryScale = scale;
210 int num = this.cursorOver;
211 if (!true)
212 {
213 }
214 int size = this._researchItems._size;
215 int selectedItem = this._selectedItem;
217 ItemSlot.SetSelectHighlight(true, scale);
218 if (instance == null)
219 {
220 }
221 int myPlayer = Main.myPlayer;
223 }
224
225 // Token: 0x06000A50 RID: 2640 RVA: 0x00031738 File Offset: 0x0002F938
227 {
228 }
229
230 // Token: 0x04000A27 RID: 2599
231 private float researchScale = (float)16256;
232
233 // Token: 0x04000A28 RID: 2600
234 private int refCost;
235
236 // Token: 0x04000A29 RID: 2601
238
239 // Token: 0x04000A2A RID: 2602
241
242 // Token: 0x04000A2B RID: 2603
243 public int _selectedItem;
244
245 // Token: 0x04000A2C RID: 2604
246 public float scrollOffset;
247
248 // Token: 0x04000A2D RID: 2605
249 private float scrollMomentum;
250
251 // Token: 0x04000A2E RID: 2606
252 private int scrollDragging;
253
254 // Token: 0x04000A2F RID: 2607
256
257 // Token: 0x04000A30 RID: 2608
258 private int cursorOver = 16256;
259
260 // Token: 0x04000A31 RID: 2609
261 private float reforgeActionScale;
262}
class f__AnonymousType0<< Count > j__TPar
static DrPlatform.DrPlatformType CurrentPlatform
Definition DrPlatform.cs:26
void ResearchItemDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
void ResearchItemOver(int index)
List< int > _researchItems
float ResearchItemScale(int index)
bool IsCollapsed(GUIPageIcons.Category category)
static InterfaceProfile_Layout Active
static string GetTextValue(string key)
Definition Language.cs:54
static int myPlayer
Definition Main.cs:2337
static bool mouseLeftRelease
Definition Main.cs:2029
static int mouseY
Definition Main.cs:601
static int mouseX
Definition Main.cs:587
static bool mouseLeft
Definition Main.cs:671
static void SetSelectHighlight(bool hasFocus, float highlightScale=-1f)
Definition ItemSlot.cs:702