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
DefaultControls.cs
Go to the documentation of this file.
1using System;
3
4namespace UnityEngine.UI
5{
6 // Token: 0x0200000F RID: 15
7 public static class DefaultControls
8 {
9 // Token: 0x17000015 RID: 21
10 // (get) Token: 0x06000059 RID: 89 RVA: 0x00002B64 File Offset: 0x00000D64
12 {
13 get
14 {
15 if (!true)
16 {
17 }
18 return 1;
19 }
20 }
21
22 // Token: 0x0600005A RID: 90 RVA: 0x00002207 File Offset: 0x00000407
23 private static GameObject CreateUIElementRoot(string name, Vector2 size, params Type[] components)
24 {
25 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
26 }
27
28 // Token: 0x0600005B RID: 91 RVA: 0x00002B78 File Offset: 0x00000D78
29 private static GameObject CreateUIObject(string name, GameObject parent, params Type[] components)
30 {
31 /*
32An exception occurred when decompiling this method (0600005B)
33
34ICSharpCode.Decompiler.DecompilerException: Error decompiling UnityEngine.GameObject UnityEngine.UI.DefaultControls::CreateUIObject(System.String,UnityEngine.GameObject,System.Type[])
35
36 ---> System.Exception: Basic block has to end with unconditional control flow.
37{
38 IL_0003:
39 brtrue(IL_0000, ldc.i4:bool(1))
40}
41
42 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
43 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
44 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
45 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
46 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
47 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
48 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
49 --- End of inner exception stack trace ---
50 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
51 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
52*/;
53 }
54
55 // Token: 0x0600005C RID: 92 RVA: 0x00002B8C File Offset: 0x00000D8C
56 private static void SetDefaultTextValues(Text lbl)
57 {
58 if (!true)
59 {
60 }
61 Font font = lbl.font;
62 lbl.AssignDefaultFont();
63 }
64
65 // Token: 0x0600005D RID: 93 RVA: 0x00002BAC File Offset: 0x00000DAC
67 {
68 }
69
70 // Token: 0x0600005E RID: 94 RVA: 0x00002BBC File Offset: 0x00000DBC
71 private static void SetParentAndAlign(GameObject child, GameObject parent)
72 {
73 if (!true)
74 {
75 }
76 }
77
78 // Token: 0x0600005F RID: 95 RVA: 0x00002BF8 File Offset: 0x00000DF8
79 private static void SetLayerRecursively(GameObject go, int layer)
80 {
81 go.layer = layer;
82 Transform transform = go.transform;
83 int childCount = transform.childCount;
84 long num = 0L;
85 DefaultControls.SetLayerRecursively(transform.GetChild((int)num).gameObject, layer);
86 int childCount2 = transform.childCount;
87 }
88
89 // Token: 0x06000060 RID: 96 RVA: 0x00002C38 File Offset: 0x00000E38
91 {
92 if (!true)
93 {
94 }
95 Type type;
96 if (type == null || type != null)
97 {
98 GameObject gameObject;
99 RectTransform component = gameObject.GetComponent<RectTransform>();
100 gameObject.GetComponent<Image>().type = Image.Type.Sliced;
101 return gameObject;
102 }
103 throw new ArrayTypeMismatchException();
104 }
105
106 // Token: 0x06000061 RID: 97 RVA: 0x00002C68 File Offset: 0x00000E68
108 {
109 if (!true)
110 {
111 }
112 Type type;
113 Type type2;
114 Type type3;
115 if ((type == null || type != null) && (type2 == null || type2 != null) && (type3 == null || type3 != null))
116 {
117 GameObject gameObject;
118 gameObject.GetComponent<Image>().type = Image.Type.Sliced;
119 Button component = gameObject.GetComponent<Button>();
122 component2.alignment = TextAnchor.MiddleCenter;
125 return gameObject;
126 }
127 throw new ArrayTypeMismatchException();
128 }
129
130 // Token: 0x06000062 RID: 98 RVA: 0x00002CC8 File Offset: 0x00000EC8
132 {
133 if (!true)
134 {
135 }
136 Type type;
137 if (type == null || type != null)
138 {
139 GameObject gameObject;
141 return gameObject;
142 }
143 throw new ArrayTypeMismatchException();
144 }
145
146 // Token: 0x06000063 RID: 99 RVA: 0x00002CF0 File Offset: 0x00000EF0
148 {
149 if (!true)
150 {
151 }
152 Type type;
153 if (type == null || type != null)
154 {
155 GameObject gameObject;
156 return gameObject;
157 }
158 throw new ArrayTypeMismatchException();
159 }
160
161 // Token: 0x06000064 RID: 100 RVA: 0x00002D10 File Offset: 0x00000F10
163 {
164 if (!true)
165 {
166 }
167 Type type;
168 if (type == null || type != null)
169 {
170 GameObject gameObject;
171 return gameObject;
172 }
173 throw new ArrayTypeMismatchException();
174 }
175
176 // Token: 0x06000065 RID: 101 RVA: 0x00002D30 File Offset: 0x00000F30
178 {
179 if (!true)
180 {
181 }
182 Type type;
183 Type type2;
184 Type type3;
185 Type type4;
186 Type type5;
187 Type type6;
188 if ((type == null || type != null) && (type2 == null || type2 != null) && (type3 == null || type3 != null) && (type4 == null || type4 != null) && (type5 == null || type5 != null) && (type6 == null || type6 != null))
189 {
190 GameObject gameObject;
191 gameObject.GetComponent<Image>().type = Image.Type.Sliced;
192 RectTransform component = gameObject.GetComponent<RectTransform>();
196 gameObject3.GetComponent<Image>().type = Image.Type.Sliced;
210 return gameObject6;
211 }
212 throw new ArrayTypeMismatchException();
213 }
214
215 // Token: 0x06000066 RID: 102 RVA: 0x00002E08 File Offset: 0x00001008
217 {
218 if (!true)
219 {
220 }
221 Type type;
222 Type type2;
223 Type type3;
224 Type type4;
225 if ((type == null || type != null) && (type2 == null || type2 != null) && (type3 == null || type3 != null) && (type4 == null || type4 != null))
226 {
227 GameObject gameObject;
228 gameObject.GetComponent<Image>().type = Image.Type.Sliced;
230 Image component = gameObject2.GetComponent<Image>();
231 component.type = Image.Type.Sliced;
237 component4.targetGraphic = component;
238 return gameObject;
239 }
240 throw new ArrayTypeMismatchException();
241 }
242
243 // Token: 0x06000067 RID: 103 RVA: 0x00002E84 File Offset: 0x00001084
245 {
246 if (!true)
247 {
248 }
249 Type type;
250 Type type2;
251 Type type3;
252 Type type4;
253 if ((type == null || type != null) && (type2 == null || type2 != null) && (type3 == null || type3 != null) && (type4 == null || type4 != null))
254 {
255 GameObject gameObject;
256 Toggle component = gameObject.GetComponent<Toggle>();
257 component.isOn = true;
260 component2.type = Image.Type.Sliced;
270 return gameObject;
271 }
272 throw new ArrayTypeMismatchException();
273 }
274
275 // Token: 0x06000068 RID: 104 RVA: 0x00002F1C File Offset: 0x0000111C
277 {
278 if (!true)
279 {
280 }
281 Type type;
282 Type type2;
283 Type type3;
284 Type type4;
285 if ((type == null || type != null) && (type2 == null || type2 != null) && (type3 == null || type3 != null) && (type4 == null || type4 != null))
286 {
287 GameObject gameObject;
288 gameObject.GetComponent<Image>().type = Image.Type.Sliced;
289 InputField component = gameObject.GetComponent<InputField>();
300 return gameObject;
301 }
302 throw new ArrayTypeMismatchException();
303 }
304
305 // Token: 0x06000069 RID: 105 RVA: 0x00002207 File Offset: 0x00000407
307 {
308 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
309 }
310
311 // Token: 0x0600006A RID: 106 RVA: 0x00002FAC File Offset: 0x000011AC
313 {
314 Type type;
315 Type type2;
316 Type type3;
317 Type type4;
318 Type type5;
319 if ((type == null || type != null) && (type2 == null || type2 != null) && (type3 == null || type3 != null) && (type4 == null || type4 != null) && (type5 == null || type5 != null))
320 {
321 GameObject gameObject;
322 gameObject.name = "Scrollbar Horizontal";
325 Vector2 sizeDelta = gameObject.GetComponent<RectTransform>().sizeDelta;
327 gameObject3.name = "Scrollbar Vertical";
329 gameObject3.GetComponent<Scrollbar>().SetDirection(Scrollbar.Direction.BottomToTop, true);
330 Vector2 sizeDelta2 = gameObject3.GetComponent<RectTransform>().sizeDelta;
334 RectTransform rectTransform;
335 component2.m_Content = rectTransform;
336 component2.viewport = component;
345 Image image;
346 image.type = Image.Type.Sliced;
348 long num = 0L;
351 image2.type = Image.Type.Sliced;
352 return gameObject2;
353 }
354 throw new ArrayTypeMismatchException();
355 }
356
357 // Token: 0x0600006B RID: 107 RVA: 0x000030D8 File Offset: 0x000012D8
358 // Note: this type is marked as 'beforefieldinit'.
360 {
361 if (!true)
362 {
363 }
364 }
365
366 // Token: 0x0400002C RID: 44
368
369 // Token: 0x0400002D RID: 45
370 private const float kWidth = 160f;
371
372 // Token: 0x0400002E RID: 46
373 private const float kThickHeight = 30f;
374
375 // Token: 0x0400002F RID: 47
376 private const float kThinHeight = 20f;
377
378 // Token: 0x04000030 RID: 48
380
381 // Token: 0x04000031 RID: 49
383
384 // Token: 0x04000032 RID: 50
386
387 // Token: 0x04000033 RID: 51
389
390 // Token: 0x04000034 RID: 52
391 private static Color s_PanelColor;
392
393 // Token: 0x04000035 RID: 53
394 private static Color s_TextColor;
395
396 // Token: 0x02000010 RID: 16
397 public interface IFactoryControls
398 {
399 // Token: 0x0600006C RID: 108
401 }
402
403 // Token: 0x02000011 RID: 17
405 {
406 // Token: 0x0600006D RID: 109 RVA: 0x00002207 File Offset: 0x00000407
407 public GameObject CreateGameObject(string name, params Type[] components)
408 {
409 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
410 }
411
412 // Token: 0x0600006E RID: 110 RVA: 0x000030E8 File Offset: 0x000012E8
414 {
415 }
416
417 // Token: 0x0600006F RID: 111 RVA: 0x000030FC File Offset: 0x000012FC
418 // Note: this type is marked as 'beforefieldinit'.
420 {
421 }
422
423 // Token: 0x04000036 RID: 54
425 }
426
427 // Token: 0x02000012 RID: 18
428 public struct Resources
429 {
430 // Token: 0x04000037 RID: 55
432
433 // Token: 0x04000038 RID: 56
435
436 // Token: 0x04000039 RID: 57
438
439 // Token: 0x0400003A RID: 58
440 public Sprite knob;
441
442 // Token: 0x0400003B RID: 59
444
445 // Token: 0x0400003C RID: 60
447
448 // Token: 0x0400003D RID: 61
449 public Sprite mask;
450 }
451 }
452}
class f__AnonymousType0<< Count > j__TPar
Component GetComponent(Type type)
Definition Component.cs:41
GameObject gameObject
Definition Component.cs:31
Component GetComponent(Type type)
Definition GameObject.cs:27
Transform GetChild(int index)
Definition Transform.cs:264
static DefaultControls.IFactoryControls Default
GameObject CreateGameObject(string name, params Type[] components)
static GameObject CreateToggle(DefaultControls.Resources resources)
static GameObject CreateUIObject(string name, GameObject parent, params Type[] components)
static GameObject CreateScrollbar(DefaultControls.Resources resources)
static void SetDefaultTextValues(Text lbl)
static GameObject CreateButton(DefaultControls.Resources resources)
static DefaultControls.IFactoryControls m_CurrentFactory
static GameObject CreateSlider(DefaultControls.Resources resources)
static GameObject CreateScrollView(DefaultControls.Resources resources)
static DefaultControls.IFactoryControls factory
static GameObject CreatePanel(DefaultControls.Resources resources)
static GameObject CreateRawImage(DefaultControls.Resources resources)
static GameObject CreateUIElementRoot(string name, Vector2 size, params Type[] components)
static GameObject CreateText(DefaultControls.Resources resources)
static GameObject CreateDropdown(DefaultControls.Resources resources)
static void SetLayerRecursively(GameObject go, int layer)
static GameObject CreateImage(DefaultControls.Resources resources)
static void SetDefaultColorTransitionValues(Selectable slider)
static void SetParentAndAlign(GameObject child, GameObject parent)
static GameObject CreateInputField(DefaultControls.Resources resources)
GameObject CreateGameObject(string name, params Type[] components)