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
GUIControllerMappingEntry.cs
Go to the documentation of this file.
1using System;
2using Controller;
5
6// Token: 0x02000073 RID: 115
8{
9 // Token: 0x0600027A RID: 634 RVA: 0x00006D90 File Offset: 0x00004F90
16
17 // Token: 0x0600027B RID: 635 RVA: 0x00006DB4 File Offset: 0x00004FB4
24
25 // Token: 0x17000075 RID: 117
26 // (get) Token: 0x0600027C RID: 636 RVA: 0x00006DD8 File Offset: 0x00004FD8
27 public bool HasMapping
28 {
29 get
30 {
32 if (controllerActionVector != null)
33 {
35 }
37 bool hasMapping;
38 if (controllerActionButton != null)
39 {
41 return hasMapping;
42 }
43 return hasMapping;
44 }
45 }
46
47 // Token: 0x0600027D RID: 637 RVA: 0x00006E0C File Offset: 0x0000500C
48 public override void DrawOverlay()
49 {
51 }
52
53 // Token: 0x0600027E RID: 638 RVA: 0x00006E20 File Offset: 0x00005020
54 public void RemoveBinding()
55 {
57 if (controllerActionVector != null)
58 {
59 this.RemoveAxisBindings(controllerActionVector);
60 }
62 if (controllerActionButton != null)
63 {
64 this.Table.RemoveButtonBindings(controllerActionButton);
65 return;
66 }
67 }
68
69 // Token: 0x0600027F RID: 639 RVA: 0x00006E58 File Offset: 0x00005058
84
85 // Token: 0x06000280 RID: 640 RVA: 0x00006ED4 File Offset: 0x000050D4
87 {
88 this.RemoveAxisBindings(actionAxis);
90 long num = 0L;
91 table.ClearLinkedAxisBindings(stateIndex, x, y, num != 0L);
93 }
94
95 // Token: 0x06000281 RID: 641 RVA: 0x00006F68 File Offset: 0x00005168
101
102 // Token: 0x06000282 RID: 642 RVA: 0x00006FD4 File Offset: 0x000051D4
108
109 // Token: 0x06000283 RID: 643 RVA: 0x00007040 File Offset: 0x00005240
110 public override void Draw()
111 {
112 bool flag = this.displayOptions;
113 if (flag && !this.drawingOverlay)
114 {
116 return;
117 }
118 if (this._optionsBlocker != null)
119 {
120 }
121 bool flag2;
122 if (flag)
123 {
124 flag2 = this.displayOptions;
125 }
128 {
129 if (!flag2)
130 {
131 }
132 return;
133 }
134 string title = this.GetTitle();
135 if (this.displayOptions)
136 {
137 int num = 1;
139 if (inputState2 != GUITransactionButton.InputState.Clicked || num == 0)
140 {
141 }
143 if (this.displayOptions)
144 {
146 if (controllerDevice == null)
147 {
148 goto IL_0243;
149 }
150 if (this.vector != null)
151 {
152 return;
153 }
154 return;
155 }
156 }
158 if (controllerActionVector != null)
159 {
162 float num2;
163 if (requiredStateExcludeLinked != null && requiredStateExcludeLinked.state)
164 {
167 return;
168 }
171 Axis axis = firstEntry.Axis0;
172 float threshold = controllerActionVector2.X.FirstEntry.Threshold;
174 return;
175 }
176 else
177 {
179 if (controllerActionButton != null)
180 {
183 if (requiredState != null && requiredState.state)
184 {
188 return;
189 }
194 return;
195 }
196 }
197 IL_0243:
198 int num3;
199 if (num3 == 0)
200 {
201 return;
202 }
203 }
204
205 // Token: 0x06000284 RID: 644 RVA: 0x000021DB File Offset: 0x000003DB
206 public override float GetElementHeight()
207 {
208 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
209 }
210
211 // Token: 0x06000285 RID: 645 RVA: 0x000072B0 File Offset: 0x000054B0
213 {
214 return true;
215 }
216
217 // Token: 0x06000286 RID: 646 RVA: 0x000072C8 File Offset: 0x000054C8
218 private string GetTitle()
219 {
220 /*
221An exception occurred when decompiling this method (06000286)
222
223ICSharpCode.Decompiler.DecompilerException: Error decompiling System.String GUIControllerMappingEntry::GetTitle()
224
225 ---> System.Exception: Basic block has to end with unconditional control flow.
226{
227 Block_1:
228 stloc:string(var_3_1F, ldfld:string(ControllerActionButton::Id, ldloc:ControllerActionButton(var_2_15)))
229 stloc:LocalizedText(var_4_30, call:LocalizedText(Language::GetText, call:string(string::Concat, ldstr:string("ControllerMappings."), ldloc:string(var_3_1F))))
230}
231
232 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
233 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
234 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
235 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
236 --- End of inner exception stack trace ---
237 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
238 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
239*/;
240 }
241
242 // Token: 0x06000287 RID: 647 RVA: 0x00007308 File Offset: 0x00005508
243 // Note: this type is marked as 'beforefieldinit'.
245 {
246 }
247
248 // Token: 0x04000237 RID: 567
250
251 // Token: 0x04000238 RID: 568
253
254 // Token: 0x04000239 RID: 569
256
257 // Token: 0x0400023A RID: 570
259
260 // Token: 0x0400023B RID: 571
261 private float buttonScale;
262
263 // Token: 0x0400023C RID: 572
264 private float scale;
265
266 // Token: 0x0400023D RID: 573
267 private bool drawingOverlay;
268
269 // Token: 0x0400023E RID: 574
270 private static int LastButtonMapped;
271
272 // Token: 0x0400023F RID: 575
273 public bool displayOptions;
274
275 // Token: 0x04000240 RID: 576
277}
class f__AnonymousType0<< Count > j__TPar
static Rectangle _gridItemRegion
ControllerActionAxis.Entry FirstEntry
ControllerActionButton.Entry.Type MappingType
ControllerActionButton.RequiredButtonState RequiredState
ControllerActionButton.Entry FirstEntry
ControllerActionButton.RequiredButtonState RequiredStateExcludeLinked
GUIControllerMappingStateTable Table
void RebindAxis(ControllerActionVector actionAxis, Axis x, Axis y, int stateIndex)
bool IsOverOptions(Vector2 cursorPosition)
GUIControllerMappingEntry(ControllerActionVector action, GUIControllerMappingStateTable table)
void RebindButton(ControllerActionButton actionButton, Buttons axisButton, int stateIndex)
GUIControllerMappingState _state
void RebindButton(ControllerActionButton actionButton, AxisButtons axisButton, int stateIndex)
void RemoveAxisBindings(ControllerActionVector actionAxis)
GUIInputRegionExclusive _optionsBlocker
GUIControllerMappingEntry(ControllerActionButton buttonMapping, GUIControllerMappingStateTable table)
void ClearLinkedAxisBindings(int stateIndex, Axis x, Axis y, bool tableOnly=false)
void RemoveButtonBindings(ControllerActionButton actionButton)
static GUIControllerInputButton.AxisControl FromAxis(Axis axis, float threshold)
static GUIControllerInputButton.LinkedControlType FromButton(Buttons button)