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
UICreativeInfiniteItemsDisplay.cs
Go to the documentation of this file.
1using System;
10using Terraria.UI;
11
13{
14 // Token: 0x02000AAE RID: 2734
16 {
17 // Token: 0x06005083 RID: 20611 RVA: 0x0027D808 File Offset: 0x0027BA08
24
25 // Token: 0x06005084 RID: 20612 RVA: 0x0027D84C File Offset: 0x0027BA4C
26 private void BuildPage()
27 {
29 base.RemoveAllChildren();
30 if (!true)
31 {
32 }
33 this.UpdateContents();
34 }
35
36 // Token: 0x06005085 RID: 20613 RVA: 0x0027D870 File Offset: 0x0027BA70
38 {
39 if (this._hovered)
40 {
42 }
43 }
44
45 // Token: 0x06005086 RID: 20614 RVA: 0x0027D894 File Offset: 0x0027BA94
49
50 // Token: 0x06005087 RID: 20615 RVA: 0x0027D8A4 File Offset: 0x0027BAA4
55
56 // Token: 0x06005088 RID: 20616 RVA: 0x0027D8B8 File Offset: 0x0027BAB8
57 private static UIPanel CreateBasicPanel()
58 {
59 /*
60An exception occurred when decompiling this method (06005088)
61
62ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.GameContent.UI.Elements.UIPanel Terraria.GameContent.UI.Elements.UICreativeInfiniteItemsDisplay::CreateBasicPanel()
63
64 ---> System.Exception: Basic block has to end with unconditional control flow.
65{
66 IL_0000:
67 brtrue(IL_0000, ldc.i4:bool(1))
68}
69
70 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
71 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
72 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
73 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
74 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
75 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
76 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
77 --- End of inner exception stack trace ---
78 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
79 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
80*/;
81 }
82
83 // Token: 0x06005089 RID: 20617 RVA: 0x0027D8C8 File Offset: 0x0027BAC8
85 {
86 }
87
88 // Token: 0x0600508A RID: 20618 RVA: 0x0027D8D8 File Offset: 0x0027BAD8
96
97 // Token: 0x0600508B RID: 20619 RVA: 0x0027D900 File Offset: 0x0027BB00
99 {
101 int num = 16128;
102 uipanel.VAlign = (float)num;
103 int num2 = 17194;
104 totalContainer.Append(uipanel);
105 this.AddCogsForSacrificeMenu(uipanel);
106 if (num2 == 0)
107 {
108 }
109 }
110
111 // Token: 0x0600508C RID: 20620 RVA: 0x0027D960 File Offset: 0x0027BB60
113 {
116 {
118 {
119 }
120 string textValue = Language.GetTextValue("CreativePowers.ResearchButtonTooltip");
121 }
122 }
123
124 // Token: 0x0600508D RID: 20621 RVA: 0x0027D988 File Offset: 0x0027BB88
126 {
127 UIElement target = evt.Target;
128 if (target != null)
129 {
130 }
131 if (evt.Target != null)
132 {
133 }
134 }
135
136 // Token: 0x0600508E RID: 20622 RVA: 0x0027D9C4 File Offset: 0x0027BBC4
138 {
139 int num = 1;
140 UIElement target = evt.Target;
141 if (num == 0)
142 {
143 }
144 if (target != null)
145 {
146 }
147 if (evt.Target != null)
148 {
149 }
150 }
151
152 // Token: 0x0600508F RID: 20623 RVA: 0x0027D9FC File Offset: 0x0027BBFC
162
163 // Token: 0x06005090 RID: 20624 RVA: 0x0027DA30 File Offset: 0x0027BC30
168
169 // Token: 0x06005091 RID: 20625 RVA: 0x0027DA44 File Offset: 0x0027BC44
188
189 // Token: 0x06005092 RID: 20626 RVA: 0x0027DAE0 File Offset: 0x0027BCE0
191 {
192 }
193
194 // Token: 0x06005093 RID: 20627 RVA: 0x0027DAF0 File Offset: 0x0027BCF0
201
202 // Token: 0x06005094 RID: 20628 RVA: 0x0027DB30 File Offset: 0x0027BD30
204 {
205 if (affectedElement != null)
206 {
207 return;
208 }
209 bool isAir = Main.mouseItem.IsAir;
210 }
211
212 // Token: 0x06005095 RID: 20629 RVA: 0x0027DB5C File Offset: 0x0027BD5C
217
218 // Token: 0x06005096 RID: 20630 RVA: 0x0027DB70 File Offset: 0x0027BD70
220 {
221 if (!true)
222 {
223 }
224 int num = 1;
225 int num2 = 60;
226 this._researchComplete = num != 0;
228 }
229
230 // Token: 0x06005097 RID: 20631 RVA: 0x0027DBB0 File Offset: 0x0027BDB0
232 {
234 this.UpdateVisualFrame();
235 }
236
237 // Token: 0x06005098 RID: 20632 RVA: 0x0027DBD0 File Offset: 0x0027BDD0
244
245 // Token: 0x06005099 RID: 20633 RVA: 0x0027DBF4 File Offset: 0x0027BDF4
246 private void ForgetItemSacrifice()
247 {
248 }
249
250 // Token: 0x0600509A RID: 20634 RVA: 0x0027DC04 File Offset: 0x0027BE04
252 {
254 }
255
256 // Token: 0x0600509B RID: 20635 RVA: 0x0027DC1C File Offset: 0x0027BE1C
262
263 // Token: 0x0600509C RID: 20636 RVA: 0x0027DC38 File Offset: 0x0027BE38
265 {
267 if (!true)
268 {
269 }
270 return float.Epsilon;
271 }
272
273 // Token: 0x0600509D RID: 20637 RVA: 0x0027DC54 File Offset: 0x0027BE54
277
278 // Token: 0x0600509E RID: 20638 RVA: 0x0027DC64 File Offset: 0x0027BE64
290
291 // Token: 0x0600509F RID: 20639 RVA: 0x0027DCC0 File Offset: 0x0027BEC0
293 {
294 this.UpdateContents();
295 }
296
297 // Token: 0x060050A0 RID: 20640 RVA: 0x0027DCD4 File Offset: 0x0027BED4
319
320 // Token: 0x060050A1 RID: 20641 RVA: 0x0027DD64 File Offset: 0x0027BF64
322 {
323 if (!true)
324 {
325 }
326 }
327
328 // Token: 0x060050A2 RID: 20642 RVA: 0x0027DDA0 File Offset: 0x0027BFA0
333
334 // Token: 0x060050A3 RID: 20643 RVA: 0x0027DDBC File Offset: 0x0027BFBC
338
339 // Token: 0x060050A4 RID: 20644 RVA: 0x0027DDCC File Offset: 0x0027BFCC
340 private void OnCanceledInput()
341 {
342 if (!true)
343 {
344 }
346 }
347
348 // Token: 0x060050A5 RID: 20645 RVA: 0x0027DDE8 File Offset: 0x0027BFE8
350 {
351 UIElement target = evt.Target;
353 UIElement <Parent>k__BackingField = target.<Parent>k__BackingField;
356 }
357
358 // Token: 0x060050A6 RID: 20646 RVA: 0x0027DE1C File Offset: 0x0027C01C
359 public override void LeftClick(UIMouseEvent evt)
360 {
361 base.LeftClick(evt);
363 }
364
365 // Token: 0x060050A7 RID: 20647 RVA: 0x0027DE38 File Offset: 0x0027C038
366 public override void RightClick(UIMouseEvent evt)
367 {
368 base.RightClick(evt);
370 }
371
372 // Token: 0x060050A8 RID: 20648 RVA: 0x0027DE54 File Offset: 0x0027C054
377
378 // Token: 0x060050A9 RID: 20649 RVA: 0x0027DE68 File Offset: 0x0027C068
379 public override void Update(GameTime gameTime)
380 {
381 base.Update(gameTime);
382 if (this._didClickSomething && !this._didClickSearchBar)
383 {
385 if (searchBar.isWritingText)
386 {
388 }
389 }
390 }
391
392 // Token: 0x060050AA RID: 20650 RVA: 0x0027DEA4 File Offset: 0x0027C0A4
393 private void OnSearchContentsChanged(string contents)
394 {
395 this._searchString = contents;
396 this._filterer.SetSearchFilter(contents);
397 this.UpdateContents();
398 }
399
400 // Token: 0x060050AB RID: 20651 RVA: 0x0027DECC File Offset: 0x0027C0CC
401 private void OnStartTakingInput()
402 {
404 if (!true)
405 {
406 }
408 }
409
410 // Token: 0x060050AC RID: 20652 RVA: 0x0027DEEC File Offset: 0x0027C0EC
411 private void OnEndTakingInput()
412 {
414 }
415
416 // Token: 0x060050AD RID: 20653 RVA: 0x0027DF00 File Offset: 0x0027C100
418 {
419 string <Value>k__BackingField = Language.GetText("UI.PlayerNameSlot").<Value>k__BackingField;
420 string searchString = this._searchString;
421 }
422
423 // Token: 0x060050AE RID: 20654 RVA: 0x0027DF24 File Offset: 0x0027C124
425 {
427 if (!true)
428 {
429 }
432 bool isWritingText = searchBar.isWritingText;
433 if (isWritingText)
434 {
435 searchBar.ToggleTakingText();
436 }
437 if (!isWritingText)
438 {
439 }
440 return true;
441 }
442
443 // Token: 0x060050AF RID: 20655 RVA: 0x0027DF5C File Offset: 0x0027C15C
445 {
446 /*
447An exception occurred when decompiling this method (060050AF)
448
449ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.UI.UserInterface Terraria.GameContent.UI.Elements.UICreativeInfiniteItemsDisplay::GetCurrentInterface()
450
451 ---> System.Exception: Basic block has to end with unconditional control flow.
452{
453 IL_0006:
454 stloc:bool(var_1_0D, callgetter:bool(Main::get_gameMenu))
455}
456
457 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
458 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
459 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
460 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
461 --- End of inner exception stack trace ---
462 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
463 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
464*/;
465 }
466
467 // Token: 0x060050B0 RID: 20656 RVA: 0x0027DF78 File Offset: 0x0027C178
468 private void OnFinishedSettingName(string name)
469 {
470 string text = name.Trim();
472 long num = 0L;
473 searchBar.SetContents(text, num != 0L);
474 this.GoBackHere();
475 }
476
477 // Token: 0x060050B1 RID: 20657 RVA: 0x0027DFA4 File Offset: 0x0027C1A4
478 private void GoBackHere()
479 {
481 if (!true)
482 {
483 }
485 }
486
487 // Token: 0x060050B2 RID: 20658 RVA: 0x0027DFC8 File Offset: 0x0027C1C8
488 public int GetItemsPerLine()
489 {
490 return this._itemGrid._itemsPerLine;
491 }
492
493 // Token: 0x060050B3 RID: 20659 RVA: 0x0027DFE0 File Offset: 0x0027C1E0
496 {
497 if (!true)
498 {
499 }
500 bool flag;
501 return flag;
502 }
503
504 // Token: 0x0400894D RID: 35149
506
507 // Token: 0x0400894E RID: 35150
509
510 // Token: 0x0400894F RID: 35151
512
513 // Token: 0x04008950 RID: 35152
515
516 // Token: 0x04008951 RID: 35153
518
519 // Token: 0x04008952 RID: 35154
521
522 // Token: 0x04008953 RID: 35155
524
525 // Token: 0x04008954 RID: 35156
526 private string _searchString;
527
528 // Token: 0x04008955 RID: 35157
530
531 // Token: 0x04008956 RID: 35158
533
534 // Token: 0x04008957 RID: 35159
536
537 // Token: 0x04008958 RID: 35160
539
540 // Token: 0x04008959 RID: 35161
542
543 // Token: 0x0400895A RID: 35162
545
546 // Token: 0x0400895B RID: 35163
547 public const string SnapPointName_SacrificeSlot = "CreativeSacrificeSlot";
548
549 // Token: 0x0400895C RID: 35164
550 public const string SnapPointName_SacrificeConfirmButton = "CreativeSacrificeConfirm";
551
552 // Token: 0x0400895D RID: 35165
553 public const string SnapPointName_InfinitesFilter = "CreativeInfinitesFilter";
554
555 // Token: 0x0400895E RID: 35166
556 public const string SnapPointName_InfinitesSearch = "CreativeInfinitesSearch";
557
558 // Token: 0x0400895F RID: 35167
559 public const string SnapPointName_InfinitesItemSlot = "CreativeInfinitesSlot";
560
561 // Token: 0x04008960 RID: 35168
563
564 // Token: 0x04008961 RID: 35169
566
567 // Token: 0x04008962 RID: 35170
569
570 // Token: 0x04008963 RID: 35171
572
573 // Token: 0x04008964 RID: 35172
575
576 // Token: 0x04008965 RID: 35173
578
579 // Token: 0x04008966 RID: 35174
581
582 // Token: 0x04008967 RID: 35175
583 private bool _researchComplete;
584
585 // Token: 0x04008968 RID: 35176
586 private bool _hovered;
587
588 // Token: 0x04008969 RID: 35177
590
591 // Token: 0x0400896A RID: 35178
593
594 // Token: 0x0400896B RID: 35179
596
597 // Token: 0x0400896C RID: 35180
598 private bool _didClickSomething;
599
600 // Token: 0x0400896D RID: 35181
601 private bool _didClickSearchBar;
602
603 // Token: 0x02000AAF RID: 2735
605 {
606 // Token: 0x0400896F RID: 35183
608 // Token: 0x04008970 RID: 35184
610 }
611 }
612}
class f__AnonymousType0<< Count > j__TPar
void RememberItemSacrifice(int itemId, int amountWeHave, int amountWeNeedTotal)
void searchCancelButton_OnClick(UIMouseEvent evt, UIElement listeningElement)
void Hover_OnMouseOver(UIMouseEvent evt, UIElement listeningElement)
void sacrificeButton_OnClick(UIMouseEvent evt, UIElement listeningElement)
void SetPageTypeToShow(UICreativeInfiniteItemsDisplay.InfiniteItemsDisplayPage page)
void searchCancelButton_OnMouseOver(UIMouseEvent evt, UIElement listeningElement)
void Hover_OnMouseOut(UIMouseEvent evt, UIElement listeningElement)
void AddSymetricalCogsPair(UIElement sacrificesContainer, Vector2 cogOFfsetsInPixels, string assetPath, List< UIImage > imagesList)
void Click_SearchArea(UIMouseEvent evt, UIElement listeningElement)
static void OffsetRotationsForCogs(float rotationOffset, List< UIImage > cogsList)
void SetContents(string contents, bool forced=false)
bool IsAir
Definition Item.cs:1820
static LocalizedText GetText(string key)
Definition Language.cs:44
static string GetTextValue(string key)
Definition Language.cs:54
static CreativeUnlocksTracker LocalPlayerCreativeTracker
Definition Main.cs:5295
static Item mouseItem
Definition Main.cs:2155
static Player LocalPlayer
Definition Main.cs:5267
void ToggleInv()
Definition Player.cs:2044
void Append(UIElement element)
Definition UIElement.cs:412
UIElement< Parent > k__BackingField