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
GUIWiresUI.cs
Go to the documentation of this file.
1using System;
2using Controller;
7using Terraria;
10using UnityEngine;
11
12// Token: 0x02000178 RID: 376
13public class GUIWiresUI
14{
15 // Token: 0x06000AAC RID: 2732 RVA: 0x0003641C File Offset: 0x0003461C
16 public GUIWiresUI()
17 {
18 if (!true)
19 {
20 }
21 if (!true)
22 {
23 }
24 this.TimeSinceChange = (float)17096;
25 base..ctor();
28 }
29
30 // Token: 0x06000AAD RID: 2733 RVA: 0x00036450 File Offset: 0x00034650
32 {
33 bool displayOptions = this.DisplayOptions;
34 if (!displayOptions)
35 {
36 if (!displayOptions)
37 {
38 }
39 int myPlayer = Main.myPlayer;
40 if (!displayOptions)
41 {
42 int num = 1;
43 this.DisplayOptions = num != 0;
44 return;
45 }
46 }
47 this.Close();
48 }
49
50 // Token: 0x06000AAE RID: 2734 RVA: 0x000364B8 File Offset: 0x000346B8
52 {
53 /*
54An exception occurred when decompiling this method (06000AAE)
55
56ICSharpCode.Decompiler.DecompilerException: Error decompiling Microsoft.Xna.Framework.Vector2 GUIWiresUI::ClampPositionToScreen(Microsoft.Xna.Framework.Vector2)
57
58 ---> System.Exception: Basic block has to end with unconditional control flow.
59{
60 IL_000F:
61 stloc:float32(var_6_24, ldfld:float32(Vector2::Y, ldfld:Vector2[exp:valuetype Microsoft.Xna.Framework.Vector2&](WireUI_Layout::TouchPanelOffset, callgetter:WireUI_Layout(WireUI_Layout::get_Instance))))
62 stloc:float32(var_8_38, ldfld:float32(Vector2::Y, ldfld:Vector2[exp:valuetype Microsoft.Xna.Framework.Vector2&](WireUI_Layout::BackingTLOffset, callgetter:WireUI_Layout(WireUI_Layout::get_Instance))))
63}
64
65 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
66 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
67 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
68 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
69 --- End of inner exception stack trace ---
70 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
71 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
72*/;
73 }
74
75 // Token: 0x06000AAF RID: 2735 RVA: 0x000021DB File Offset: 0x000003DB
76 private float ItemScale(int index)
77 {
78 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
79 }
80
81 // Token: 0x06000AB0 RID: 2736 RVA: 0x00036500 File Offset: 0x00034700
82 private void ItemOver(int index)
83 {
85 }
86
87 // Token: 0x06000AB1 RID: 2737 RVA: 0x00036514 File Offset: 0x00034714
88 private void ItemDraw(ItemGrid_Layout gridLayout, int i, Microsoft.Xna.Framework.Vector2 position, float scale)
89 {
90 int num = 1;
92 if (num == 0)
93 {
94 }
97 float x = instance.TouchPanelOffset.X;
98 float y = instance.TouchPanelOffset.Y;
100 if (!overloadSize)
101 {
102 if (!overloadSize)
103 {
104 }
105 }
106 int num2 = 32640;
109 if (num2 == 0)
110 {
111 }
114 float[] buttonScales = this.ButtonScales;
117 {
118 return;
119 }
120 }
121
122 // Token: 0x06000AB2 RID: 2738 RVA: 0x00036640 File Offset: 0x00034840
123 private bool CanInteract()
124 {
125 /*
126An exception occurred when decompiling this method (06000AB2)
127
128ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean GUIWiresUI::CanInteract()
129
130 ---> System.Exception: Basic block has to end with unconditional control flow.
131{
132 IL_003C:
133 stloc:int32(var_10_44, callgetter:int32(Main::get_signHover))
134}
135
136 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
137 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
138 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
139 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
140 --- End of inner exception stack trace ---
141 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
142 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
143*/;
144 }
145
146 // Token: 0x06000AB3 RID: 2739 RVA: 0x00036694 File Offset: 0x00034894
147 public void DrawCursor()
148 {
150 }
151
152 // Token: 0x06000AB4 RID: 2740 RVA: 0x000366B0 File Offset: 0x000348B0
153 public void DrawOverlay()
154 {
155 if (this.DisplayOptions)
156 {
158 this.Close();
159 }
161 global::Cursor cursor;
162 if (cursor != null)
163 {
165 if (this.CalculateRegion() == null)
166 {
167 }
168 bool key = KeyboardInput.GetKey(KeyCode.Mouse1);
169 }
171 if (this.DisplayOptions)
172 {
175 this._controller.Activate();
176 string textValue = Language.GetTextValue("Mobile.FilterItemsClose");
178 return;
179 }
180 }
181
182 // Token: 0x06000AB5 RID: 2741 RVA: 0x000367E4 File Offset: 0x000349E4
183 public void DrawButton()
184 {
185 }
186
187 // Token: 0x06000AB6 RID: 2742 RVA: 0x000367F4 File Offset: 0x000349F4
188 private void DrawCursorArea(SpriteBatch spriteBatch)
189 {
190 global::Cursor cursor;
191 if (cursor != null)
192 {
193 int worldMouseX = Main.worldMouseX;
194 int worldMouseY = Main.worldMouseY;
196 float x = instance.CursorPanelOffset.X;
197 float y = instance.CursorPanelOffset.Y;
200 int num = 1;
202 if (num == 0)
203 {
204 }
205 return;
206 }
207 }
208
209 // Token: 0x06000AB7 RID: 2743 RVA: 0x000368F4 File Offset: 0x00034AF4
210 public void Close()
211 {
212 if (this.DisplayOptions)
213 {
215 int selectedItem = Main.LocalPlayer.selectedItem;
216 return;
217 }
218 }
219
220 // Token: 0x06000AB8 RID: 2744 RVA: 0x00036920 File Offset: 0x00034B20
222 {
223 if (!true)
224 {
225 }
226 bool gameMenu = Main.gameMenu;
227 if (this.DisplayOptions)
228 {
231 bool flag = active.AnyOpen();
232 bool flag2 = active.IsPageSelected(GUIPageIcons.Category.Inventory);
233 if (this.CalculateRegion() == null)
234 {
235 }
236 bool flag3;
237 return flag3;
238 }
239 }
240
241 // Token: 0x06000AB9 RID: 2745 RVA: 0x0003697C File Offset: 0x00034B7C
262
263 // Token: 0x04000B0A RID: 2826
264 private int hoverItem = 1;
265
266 // Token: 0x04000B0B RID: 2827
268
269 // Token: 0x04000B0C RID: 2828
270 private float[] ButtonScales;
271
272 // Token: 0x04000B0D RID: 2829
273 private float TimeSinceChange;
274
275 // Token: 0x04000B0E RID: 2830
276 private float ToggleButtonScale;
277
278 // Token: 0x04000B0F RID: 2831
279 public bool DisplayOptions;
280
281 // Token: 0x04000B10 RID: 2832
283
284 // Token: 0x04000B11 RID: 2833
286}
class f__AnonymousType0<< Count > j__TPar
static Rectangle GetRegion(TransactionButton_Layout layout)
void ItemOver(int index)
Definition GUIWiresUI.cs:82
float[] ButtonScales
bool DisplayOptions
float TimeSinceChange
void DrawButton()
GUIControllerWiresUI _controller
float ItemScale(int index)
Definition GUIWiresUI.cs:76
Microsoft.Xna.Framework.Vector2 PopupPosition
bool IsOver(Microsoft.Xna.Framework.Vector2 cursorPosition)
float ToggleButtonScale
void DrawCursor()
void ItemDraw(ItemGrid_Layout gridLayout, int i, Microsoft.Xna.Framework.Vector2 position, float scale)
Definition GUIWiresUI.cs:88
void DrawCursorArea(SpriteBatch spriteBatch)
void Close()
void DrawOverlay()
GUIInputRegionExclusive PickingInterceptor
void PlayerMenuDisplayToggle()
Definition GUIWiresUI.cs:31
bool CanInteract()
Rectangle CalculateRegion()
Microsoft.Xna.Framework.Vector2 ClampPositionToScreen(Microsoft.Xna.Framework.Vector2 position)
Definition GUIWiresUI.cs:51
bool IsPageSelected(GUIPageIcons.Category category)
static InterfaceProfile_Layout Active
static bool GetKey(KeyCode keycode)
static Vector2 GetUICursorPosition()
Definition Mouse.cs:358
static WiresUI.Settings.MultiToolMode ToolMode
Definition WiresUI.cs:72
static string GetTextValue(string key)
Definition Language.cs:54
static void FlushBatches()
Definition Main.cs:5092
static int myPlayer
Definition Main.cs:2337
static int worldMouseY
Definition Main.cs:629
static bool gameMenu
Definition Main.cs:2673
static Player LocalPlayer
Definition Main.cs:5267
static int worldMouseX
Definition Main.cs:615
ItemGrid_Layout ToolOptions
TransactionButton_Layout PlacementBacking
static WireUI_Layout Instance
Vector2 BackingBROffset
Vector2 TouchPanelOffset
Vector2 CursorPanelOffset
Vector2 BackingTLOffset