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
GUIHousingMenu.cs
Go to the documentation of this file.
1using System;
3using Controller;
7using Terraria;
8using Terraria.UI;
9
10// Token: 0x02000149 RID: 329
11public class GUIHousingMenu
12{
13 // Token: 0x170000DF RID: 223
14 // (get) Token: 0x060008EB RID: 2283 RVA: 0x000261F8 File Offset: 0x000243F8
15 // (set) Token: 0x060008EC RID: 2284 RVA: 0x0002620C File Offset: 0x0002440C
16 public bool Visible
17 {
18 get
19 {
20 return this._visible;
21 }
22 set
23 {
24 if (!true)
25 {
26 }
27 }
28 }
29
30 // Token: 0x060008ED RID: 2285 RVA: 0x0002621C File Offset: 0x0002441C
37
38 // Token: 0x060008EE RID: 2286 RVA: 0x00026238 File Offset: 0x00024438
39 private void DrawPageIcons()
40 {
41 }
42
43 // Token: 0x170000E0 RID: 224
44 // (get) Token: 0x060008EF RID: 2287 RVA: 0x00026248 File Offset: 0x00024448
45 public bool collapsed
46 {
47 get
48 {
49 if (!true)
50 {
51 }
53 }
54 }
55
56 // Token: 0x170000E1 RID: 225
57 // (get) Token: 0x060008F0 RID: 2288 RVA: 0x00026268 File Offset: 0x00024468
59 {
60 get
61 {
64 return texture2D;
65 }
66 }
67
68 // Token: 0x170000E2 RID: 226
69 // (get) Token: 0x060008F1 RID: 2289 RVA: 0x0002627C File Offset: 0x0002447C
70 public bool HasFocus
71 {
72 get
73 {
75 return true;
76 }
77 }
78
79 // Token: 0x060008F2 RID: 2290 RVA: 0x000021DB File Offset: 0x000003DB
80 private void RefreshNPCEntries()
81 {
82 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
83 }
84
85 // Token: 0x060008F3 RID: 2291 RVA: 0x00026294 File Offset: 0x00024494
86 public float NPCScale(int index)
87 {
88 /*
89An exception occurred when decompiling this method (060008F3)
90
91ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single GUIHousingMenu::NPCScale(System.Int32)
92
93 ---> System.Exception: Basic block has to end with unconditional control flow.
94{
95 Block_0:
96 stloc:!0(var_0_05, callgetter:!0(PageControllerLayoutDefinition`1::get_Instance))
97}
98
99 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
100 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
101 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
102 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
103 --- End of inner exception stack trace ---
104 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
105 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
106*/;
107 }
108
109 // Token: 0x060008F4 RID: 2292 RVA: 0x000262A8 File Offset: 0x000244A8
110 public void NPCOver(int index)
111 {
112 int num = 1;
114 if (num == 0)
115 {
116 }
118 if (index == 0)
119 {
120 bool mouseLeft = Main.mouseLeft;
121 if (Main.mouseItem.type == 0)
122 {
124 if (guicontrollerHousing != null)
125 {
126 long num2 = 0L;
129 }
130 if (this._lastNPCOVer != 0)
131 {
132 return;
133 }
134 }
135 if (Main.mouseItem.type == 0)
136 {
137 int num3 = 1;
138 this._npcOver = num3 != 0;
139 }
140 return;
141 }
143 if (num == 0)
144 {
145 }
147 string text;
150 if (Main.mouseItem.type == 0)
151 {
154 if (guicontrollerHousing2 != null)
155 {
158 }
159 bool mouseLeftRelease = Main.mouseLeftRelease;
160 int lastNPCOVer = this._lastNPCOVer;
163 object syncRoot = this._activeNPCEntries._syncRoot;
164 Main.mouseLeftRelease = false;
165 return;
166 }
167 string text2 = this.npcString;
168 }
169
170 // Token: 0x060008F5 RID: 2293 RVA: 0x000263B8 File Offset: 0x000245B8
171 public void NPCDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
172 {
173 if (index != 0)
174 {
177 return;
178 }
179 }
180
181 // Token: 0x060008F6 RID: 2294 RVA: 0x000265F4 File Offset: 0x000247F4
183 {
185 bool[] keyState = controllerDevice._KeyState;
186 }
187
188 // Token: 0x060008F7 RID: 2295 RVA: 0x0002666C File Offset: 0x0002486C
189 private void PreviousItem()
190 {
191 }
192
193 // Token: 0x060008F8 RID: 2296 RVA: 0x00026684 File Offset: 0x00024884
194 private void NextItem()
195 {
196 }
197
198 // Token: 0x060008F9 RID: 2297 RVA: 0x0002669C File Offset: 0x0002489C
199 private void UpdateHotbarScroll()
200 {
201 float scrollAmount = this.ScrollAmount;
202 float mouseScrollDelta = XNAUnityRunner.GetMouseScrollDelta(false);
203 }
204
205 // Token: 0x060008FA RID: 2298 RVA: 0x000266C4 File Offset: 0x000248C4
206 public void Draw()
207 {
209 int myPlayer = Main.myPlayer;
210 int myPlayer2 = Main.myPlayer;
212 this.RefreshNPCEntries();
213 bool npcOver = this._npcOver;
214 if (!npcOver)
215 {
216 this._lastNPCOVer = (npcOver ? 1 : 0);
217 }
218 this.over = (npcOver ? 1 : 0);
222 int itemCount = draggableItemGrid_Layout.ItemCount;
224 if (rectangle == null)
225 {
226 }
227 int mouseX = Main.mouseX;
228 int mouseY = Main.mouseY;
231 int size = activeNPCEntries._size;
232 if (activeNPCEntries == null)
233 {
234 }
236 if (guicontrollerHousing != null)
237 {
240 }
241 bool npcOver2 = this._npcOver;
242 if (npcOver2)
243 {
244 if (!npcOver2)
245 {
246 }
247 bool npcOver3 = this._npcOver;
248 int num;
249 this._lastNPCOVer = num;
250 if (npcOver3)
251 {
252 if (!npcOver3)
253 {
254 }
255 string text = this.npcString;
256 return;
257 }
258 }
259 else
260 {
261 bool npcOver3;
262 this._lastNPCOVer = (npcOver3 ? 1 : 0);
263 }
264 }
265
266 // Token: 0x060008FB RID: 2299 RVA: 0x000267A8 File Offset: 0x000249A8
268 {
269 }
270
271 // Token: 0x040007C0 RID: 1984
272 private bool _visible;
273
274 // Token: 0x040007C1 RID: 1985
276
277 // Token: 0x040007C2 RID: 1986
278 public int NPCHousingHover;
279
280 // Token: 0x040007C3 RID: 1987
282
283 // Token: 0x040007C4 RID: 1988
284 public string npcString;
285
286 // Token: 0x040007C5 RID: 1989
287 private int _lastNPCOVer;
288
289 // Token: 0x040007C6 RID: 1990
290 private bool _npcOver;
291
292 // Token: 0x040007C7 RID: 1991
293 private int over;
294
295 // Token: 0x040007C8 RID: 1992
297
298 // Token: 0x040007C9 RID: 1993
299 public float scrollOffset;
300
301 // Token: 0x040007CA RID: 1994
302 private float scrollMomentum;
303
304 // Token: 0x040007CB RID: 1995
305 private int scrollDragging;
306
307 // Token: 0x040007CC RID: 1996
309
310 // Token: 0x040007CD RID: 1997
311 private float scrollDelay;
312
313 // Token: 0x040007CE RID: 1998
314 private int _npcCount;
315
316 // Token: 0x040007CF RID: 1999
317 public int ActiveNPCCount;
318
319 // Token: 0x040007D0 RID: 2000
320 private float HousingQueryScale = (float)16256;
321
322 // Token: 0x040007D1 RID: 2001
323 public bool menuTogglePressed;
324
325 // Token: 0x040007D2 RID: 2002
327
328 // Token: 0x040007D3 RID: 2003
329 private bool hotbarActive;
330
331 // Token: 0x040007D4 RID: 2004
332 private float ScrollAmount;
333}
class f__AnonymousType0<< Count > j__TPar
static DrPlatform.DrPlatformType CurrentPlatform
Definition DrPlatform.cs:26
void UpdateHotbarScroll()
DateTime NavigationTick
float NPCScale(int index)
List< int > _activeNPCEntries
void UpdateHotbarNavigation()
void NPCDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
void NPCOver(int index)
Texture2D _npcHeadTexture
void RefreshNPCEntries()
Texture2D _npcHeadTextureEmpty
bool IsCollapsed(GUIPageIcons.Category category)
static InterfaceProfile_Layout Active
static int myPlayer
Definition Main.cs:2337
static bool mouseLeftRelease
Definition Main.cs:2029
static Item mouseItem
Definition Main.cs:2155
static int mouseY
Definition Main.cs:601
static int mouseX
Definition Main.cs:587
static bool mouseLeft
Definition Main.cs:671
static void UpdateTooltipContext(int context, int slot)
Definition ItemSlot.cs:972
static float GetMouseScrollDelta(bool ignoreEditor=false)