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
GUIControlsBanner.cs
Go to the documentation of this file.
1using System;
4using System.Text;
5using Controller;
9using Terraria;
10
11// Token: 0x0200012F RID: 303
13{
14 // Token: 0x060007E5 RID: 2021 RVA: 0x000021DB File Offset: 0x000003DB
15 private float ItemScale(int index)
16 {
17 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
18 }
19
20 // Token: 0x060007E6 RID: 2022 RVA: 0x0001F274 File Offset: 0x0001D474
21 private void ItemOver(int index)
22 {
23 }
24
25 // Token: 0x060007E7 RID: 2023 RVA: 0x000021DB File Offset: 0x000003DB
26 public void ItemDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
27 {
28 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
29 }
30
31 // Token: 0x060007E8 RID: 2024 RVA: 0x000021DB File Offset: 0x000003DB
32 public void ItemRightDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
33 {
34 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
35 }
36
37 // Token: 0x060007E9 RID: 2025 RVA: 0x000021DB File Offset: 0x000003DB
39 {
40 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
41 }
42
43 // Token: 0x060007EA RID: 2026 RVA: 0x0001F284 File Offset: 0x0001D484
45 {
46 bool hasMapping = action.HasMapping;
49 string text;
50 if (requiredState != null)
51 {
53 if (requiredState.state)
54 {
55 Buttons button2 = requiredState.Button2;
56 }
58 bool state = requiredState.state2;
59 long num = 0L;
60 if (requiredState.state)
61 {
62 }
63 bool state2 = requiredState.state2;
64 long num2 = 0L;
65 if (num != 0L)
66 {
67 }
68 if (num2 != 0L)
69 {
70 string text2;
71 string text3;
72 text = text2 + "[cb:" + text3 + "]";
73 }
74 }
75 Axis axis = firstEntry.Axis0;
76 return text;
77 }
78
79 // Token: 0x060007EB RID: 2027 RVA: 0x0001F32C File Offset: 0x0001D52C
81 {
82 bool hasMapping = action.HasMapping;
85 string text;
86 if (requiredState != null)
87 {
89 if (requiredState.state)
90 {
91 Buttons button2 = requiredState.Button2;
92 }
94 bool state = requiredState.state2;
95 long num = 0L;
96 if (requiredState.state)
97 {
98 }
99 bool state2 = requiredState.state2;
100 long num2 = 0L;
101 if (num != 0L)
102 {
103 }
104 if (num2 != 0L)
105 {
106 string text2;
107 string text3;
108 text = text2 + "[cb:" + text3 + "]";
109 }
110 }
111 if (firstEntry.MappingType != ControllerActionButton.Entry.Type.Axis)
112 {
113 Buttons button4 = firstEntry.Button;
114 }
115 string text4;
116 return text + "[ca:" + text4 + "]";
117 }
118
119 // Token: 0x060007EC RID: 2028 RVA: 0x0001F3D0 File Offset: 0x0001D5D0
120 public static GUIControllerInputButton.AxisControl FromAxis(Axis axis, float threshold)
121 {
122 }
123
124 // Token: 0x060007ED RID: 2029 RVA: 0x000021DB File Offset: 0x000003DB
125 private Vector2 ItemSize(int index)
126 {
127 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
128 }
129
130 // Token: 0x060007EE RID: 2030 RVA: 0x0001F3F0 File Offset: 0x0001D5F0
139
140 // Token: 0x060007EF RID: 2031 RVA: 0x0001F414 File Offset: 0x0001D614
142 {
143 LayoutCalculator.AnchorType anchor = position.Anchor;
144 layout.Anchor = anchor;
145 ControlAnchor.ControlId anchorControl = position.AnchorControl;
147 float x = position.Location.X;
148 float y = position.Location.Y;
150 {
151 }
152 }
153
154 // Token: 0x060007F0 RID: 2032 RVA: 0x0001F45C File Offset: 0x0001D65C
156 {
157 if (offset != null)
158 {
159 Texture_Layout iconTexture = layout.IconTexture;
160 return;
161 }
162 }
163
164 // Token: 0x060007F1 RID: 2033 RVA: 0x0001F474 File Offset: 0x0001D674
166 {
168 Vector2 location = layoutItem.Location;
169 float x = layoutItem.Location.X;
170 float y = layoutItem.Location.Y;
171 if (!true)
172 {
173 }
174 return 1;
175 }
176
177 // Token: 0x060007F2 RID: 2034 RVA: 0x0001F4AC File Offset: 0x0001D6AC
178 private bool AddAction(GUIControlsBanner.Action action, int maxWidth)
179 {
180 if (!true)
181 {
182 }
183 bool disabled = action.Disabled;
184 if (disabled)
185 {
186 return;
187 }
188 ControllerActionVector axis = action.Axis;
189 int num;
190 if (axis != null)
191 {
192 bool hasMapping = axis.HasMapping;
193 if (num == 0 || !disabled)
194 {
195 }
196 if (!disabled)
197 {
198 }
200 }
201 ControllerActionButton button = action.Button;
202 if (button != null)
203 {
204 bool hasMapping2 = button.HasMapping;
205 if (num == 0 || !disabled)
206 {
207 }
208 if (!disabled)
209 {
210 }
211 ControllerActionButton button2 = action.Button;
212 string name = action.Name;
214 StringBuilder stringBuilder = stringBuilder2.Append(name);
215 return;
216 }
217 }
218
219 // Token: 0x060007F3 RID: 2035 RVA: 0x0001F52C File Offset: 0x0001D72C
220 private bool AddMore(int maxWidth)
221 {
222 if (!true)
223 {
224 }
226 bool moreRightActions;
227 if (!moreLeftActions)
228 {
230 if (!moreRightActions)
231 {
232 goto IL_007C;
233 }
234 }
235 int num;
236 bool moreLeftActions2;
237 if (num != 0)
238 {
239 if (!moreLeftActions)
240 {
241 }
243 }
244 if (moreLeftActions2)
245 {
246 if (!moreLeftActions2)
247 {
248 }
249 string text2;
250 string text = "[cb:" + text2 + "]";
252 if ("[cb:" == null)
253 {
254 }
255 }
257 if (moreRightActions3)
258 {
260 {
261 }
262 string text4;
263 string text3 = "[cb:" + text4 + "] ";
264 }
265 if ("[cb:" == null)
266 {
267 }
268 IL_007C:
269 if (!moreRightActions)
270 {
271 return;
272 }
273 }
274
275 // Token: 0x060007F4 RID: 2036 RVA: 0x0001F5C0 File Offset: 0x0001D7C0
277 {
278 ControllerActionVector axis = x.Axis;
279 if (axis != null)
280 {
282 }
283 ControllerActionButton button = x.Button;
284 if (button != null)
285 {
287 }
288 int displayPriorityOffset = x.DisplayPriorityOffset;
290 if (axis2 != null)
291 {
293 }
294 ControllerActionButton button2 = y.Button;
295 if (button2 != null)
296 {
297 int displayPriority4 = button2.DisplayPriority;
298 }
299 int displayPriorityOffset2 = y.DisplayPriorityOffset;
300 int num;
301 return num;
302 }
303
304 // Token: 0x060007F5 RID: 2037 RVA: 0x0001F62C File Offset: 0x0001D82C
306 {
307 int num = 1;
308 if (num == 0)
309 {
310 }
311 if (num == 0)
312 {
313 }
315 int size = this.AllActions._size;
316 int size2 = this.AllActions._size;
317 }
318
319 // Token: 0x060007F6 RID: 2038 RVA: 0x0001F6D8 File Offset: 0x0001D8D8
321 {
322 int num = 1;
325 if (num == 0)
326 {
327 }
328 if (num == 0)
329 {
330 }
331 int num2 = 32640;
332 int num3 = 1;
333 this.secondLine = num3 != 0;
334 int size = this.currentActions._size;
335 if (num2 == 0)
336 {
337 }
338 if (this.lastDrawRegion2.Width != 0)
339 {
340 if (num2 == 0)
341 {
342 }
343 if (this.secondLine)
344 {
346 int width = this.lastDrawRegion2.Width;
347 Vector2 vector = rectangle.TopLeft();
349 int width2 = this.lastDrawRegion2.Width;
350 Vector2 vector2 = rectangle2.BottomRight();
351 }
352 }
353 }
354
355 // Token: 0x060007F7 RID: 2039 RVA: 0x0001F77C File Offset: 0x0001D97C
357 {
360 if (!true)
361 {
362 }
363 if (!true)
364 {
365 }
366 this.secondLine = true;
367 int size = this.currentActions._size;
368 if (32640 == 0)
369 {
370 }
371 if (this.lastDrawRegion2.Width != 0)
372 {
373 if (32640 == 0)
374 {
375 }
376 if (this.secondLine)
377 {
379 int width = this.lastDrawRegion2.Width;
380 Vector2 vector = rectangle.TopLeft();
382 int width2 = this.lastDrawRegion2.Width;
383 Vector2 vector2 = rectangle2.BottomRight();
384 }
385 }
386 }
387
388 // Token: 0x060007F8 RID: 2040 RVA: 0x0001F824 File Offset: 0x0001DA24
390 {
393 if (moreLeftStateActions != null)
394 {
395 return;
396 }
398 if (moreRightStateActions == null || moreRightStateActions == null)
399 {
400 }
402 }
403
404 // Token: 0x060007F9 RID: 2041 RVA: 0x0001F940 File Offset: 0x0001DB40
406 {
409 if (this.MoreLeftActions)
410 {
411 return;
412 }
413 if (this.MoreRightActions)
414 {
415 return;
416 }
417 }
418
419 // Token: 0x060007FA RID: 2042 RVA: 0x000021DB File Offset: 0x000003DB
420 public void Draw()
421 {
422 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
423 }
424
425 // Token: 0x060007FB RID: 2043 RVA: 0x0001F970 File Offset: 0x0001DB70
429
430 // Token: 0x060007FC RID: 2044 RVA: 0x0001F980 File Offset: 0x0001DB80
432 {
433 if (itemTexture != null)
434 {
435 long num = 0L;
436 long num2 = 0L;
437 long num3 = 0L;
438 long num4 = 0L;
439 Rectangle rectangle = itemTexture.Frame(1, 1, (int)num, (int)num2, (int)num3, (int)num4);
440 return;
441 }
442 }
443
444 // Token: 0x060007FD RID: 2045 RVA: 0x000021DB File Offset: 0x000003DB
446 {
447 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
448 }
449
450 // Token: 0x060007FE RID: 2046 RVA: 0x0001F9AC File Offset: 0x0001DBAC
454
455 // Token: 0x060007FF RID: 2047 RVA: 0x0001F9BC File Offset: 0x0001DBBC
457 {
458 if (itemTexture != null)
459 {
460 long num = 0L;
461 long num2 = 0L;
462 long num3 = 0L;
463 long num4 = 0L;
464 Rectangle rectangle = itemTexture.Frame(1, 1, (int)num, (int)num2, (int)num3, (int)num4);
465 return;
466 }
467 }
468
469 // Token: 0x06000800 RID: 2048 RVA: 0x000021DB File Offset: 0x000003DB
471 {
472 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
473 }
474
475 // Token: 0x06000801 RID: 2049 RVA: 0x0001F9E8 File Offset: 0x0001DBE8
477 {
478 }
479
480 // Token: 0x0400067F RID: 1663
482
483 // Token: 0x04000680 RID: 1664
485
486 // Token: 0x04000681 RID: 1665
487 private bool[] MoreLeftStateActions;
488
489 // Token: 0x04000682 RID: 1666
490 private bool[] MoreRightStateActions;
491
492 // Token: 0x04000683 RID: 1667
494
495 // Token: 0x04000684 RID: 1668
497
498 // Token: 0x04000685 RID: 1669
500
501 // Token: 0x04000686 RID: 1670
503
504 // Token: 0x04000687 RID: 1671
505 private bool MoreLeftActions;
506
507 // Token: 0x04000688 RID: 1672
508 private bool MoreRightActions;
509
510 // Token: 0x04000689 RID: 1673
511 public bool ShowBanner = true;
512
513 // Token: 0x0400068A RID: 1674
515
516 // Token: 0x0400068B RID: 1675
517 private bool secondLine;
518
519 // Token: 0x0400068C RID: 1676
521
522 // Token: 0x0400068D RID: 1677
524
525 // Token: 0x0400068E RID: 1678
527
528 // Token: 0x0400068F RID: 1679
530
531 // Token: 0x04000690 RID: 1680
533
534 // Token: 0x04000691 RID: 1681
536
537 // Token: 0x04000692 RID: 1682
538 private float ScaleLB;
539
540 // Token: 0x04000693 RID: 1683
542
543 // Token: 0x04000694 RID: 1684
545
546 // Token: 0x04000695 RID: 1685
547 private float ScaleRB;
548
549 // Token: 0x04000696 RID: 1686
551
552 // Token: 0x04000697 RID: 1687
554
555 // Token: 0x04000698 RID: 1688
557
558 // Token: 0x04000699 RID: 1689
560
561 // Token: 0x0400069A RID: 1690
562 private int itemsDrawing;
563
564 // Token: 0x0400069B RID: 1691
565 private float leftMoreScale;
566
567 // Token: 0x0400069C RID: 1692
568 private float rightMoreScale;
569
570 // Token: 0x02000130 RID: 304
571 public enum ActionSource
572 {
573 // Token: 0x0400069E RID: 1694
574 MainMenu,
575 // Token: 0x0400069F RID: 1695
576 World,
577 // Token: 0x040006A0 RID: 1696
579 // Token: 0x040006A1 RID: 1697
581 // Token: 0x040006A2 RID: 1698
583 // Token: 0x040006A3 RID: 1699
584 Dresser,
585 // Token: 0x040006A4 RID: 1700
587 // Token: 0x040006A5 RID: 1701
588 Map,
589 // Token: 0x040006A6 RID: 1702
590 Count
591 }
592
593 // Token: 0x02000131 RID: 305
594 public class Action
595 {
596 // Token: 0x06000802 RID: 2050 RVA: 0x0001FA04 File Offset: 0x0001DC04
608
609 // Token: 0x06000803 RID: 2051 RVA: 0x0001FA64 File Offset: 0x0001DC64
623
624 // Token: 0x040006A7 RID: 1703
626
627 // Token: 0x040006A8 RID: 1704
629
630 // Token: 0x040006A9 RID: 1705
632
633 // Token: 0x040006AA RID: 1706
635
636 // Token: 0x040006AB RID: 1707
638
639 // Token: 0x040006AC RID: 1708
641
642 // Token: 0x040006AD RID: 1709
643 public string Name;
644
645 // Token: 0x040006AE RID: 1710
646 public int InputPriority;
647
648 // Token: 0x040006AF RID: 1711
649 public bool Disabled;
650
651 // Token: 0x040006B0 RID: 1712
653
654 // Token: 0x02000132 RID: 306
655 public enum ControlPriority
656 {
657 // Token: 0x040006B2 RID: 1714
659 // Token: 0x040006B3 RID: 1715
661 // Token: 0x040006B4 RID: 1716
662 DPadDown,
663 // Token: 0x040006B5 RID: 1717
664 DPadUp,
665 // Token: 0x040006B6 RID: 1718
666 DPadLeft,
667 // Token: 0x040006B7 RID: 1719
668 DPadRight,
669 // Token: 0x040006B8 RID: 1720
670 LSDown,
671 // Token: 0x040006B9 RID: 1721
672 LSUp,
673 // Token: 0x040006BA RID: 1722
674 LSLeft,
675 // Token: 0x040006BB RID: 1723
676 LSRight,
677 // Token: 0x040006BC RID: 1724
678 LSClick,
679 // Token: 0x040006BD RID: 1725
681 // Token: 0x040006BE RID: 1726
682 LeftMore,
683 // Token: 0x040006BF RID: 1727
685 // Token: 0x040006C0 RID: 1728
687 // Token: 0x040006C1 RID: 1729
688 Action2,
689 // Token: 0x040006C2 RID: 1730
690 Action4,
691 // Token: 0x040006C3 RID: 1731
692 Action3,
693 // Token: 0x040006C4 RID: 1732
694 Action1,
695 // Token: 0x040006C5 RID: 1733
696 RSDown,
697 // Token: 0x040006C6 RID: 1734
698 RSUp,
699 // Token: 0x040006C7 RID: 1735
700 RSLeft,
701 // Token: 0x040006C8 RID: 1736
702 RSRight,
703 // Token: 0x040006C9 RID: 1737
704 RSClick,
705 // Token: 0x040006CA RID: 1738
706 Settings,
707 // Token: 0x040006CB RID: 1739
709 }
710 }
711
712 // Token: 0x02000133 RID: 307
713 private class ActionGroup
714 {
715 // Token: 0x06000804 RID: 2052 RVA: 0x0001FB14 File Offset: 0x0001DD14
716 public ActionGroup()
717 {
718 }
719
720 // Token: 0x040006CC RID: 1740
722
723 // Token: 0x040006CD RID: 1741
725
726 // Token: 0x040006CE RID: 1742
728
729 // Token: 0x040006CF RID: 1743
731
732 // Token: 0x040006D0 RID: 1744
733 public float ScaleUp;
734
735 // Token: 0x040006D1 RID: 1745
736 public float ScaleDown;
737
738 // Token: 0x040006D2 RID: 1746
739 public float ScaleLeft;
740
741 // Token: 0x040006D3 RID: 1747
742 public float ScaleRight;
743 }
744
745 // Token: 0x02000134 RID: 308
747 [Serializable]
748 private sealed class <>c
749 {
750 // Token: 0x06000805 RID: 2053 RVA: 0x0001FB28 File Offset: 0x0001DD28
751 // Note: this type is marked as 'beforefieldinit'.
752 static <>c()
753 {
754 }
755
756 // Token: 0x06000806 RID: 2054 RVA: 0x0001FB38 File Offset: 0x0001DD38
757 public <>c()
758 {
759 }
760
761 // Token: 0x06000807 RID: 2055 RVA: 0x0001FB4C File Offset: 0x0001DD4C
763 {
764 int inputPriority = e2.InputPriority;
765 int num;
766 return num;
767 }
768
769 // Token: 0x06000808 RID: 2056 RVA: 0x0001FB64 File Offset: 0x0001DD64
771 {
772 int inputPriority = e2.InputPriority;
773 int num;
774 return num;
775 }
776
777 // Token: 0x040006D4 RID: 1748
778 public static readonly GUIControlsBanner.<>c <>9;
779
780 // Token: 0x040006D5 RID: 1749
781 public static Comparison<GUIControlsBanner.Action> <>9__48_0;
782
783 // Token: 0x040006D6 RID: 1750
784 public static Comparison<GUIControlsBanner.Action> <>9__49_0;
785 }
786}
class f__AnonymousType0<< Count > j__TPar
static void SetGridItemRegion(Rectangle region)
GUIControlsBanner.Action ActionLeft
GUIControlsBanner.Action ActionDown
GUIControlsBanner.Action ActionRight
GUIControlsBanner.Action ActionUp
Action(GUIControlsBanner.ActionSource source, ControllerActionVector action, string name, Texture2D itemTexture, Rectangle srcRegion, TransactionButton_Layout style, bool disabled, int displayPriorityOffset)
TransactionButton_Layout ActionStyle
ControllerActionVector Axis
Action(GUIControlsBanner.ActionSource source, ControllerActionButton action, string name, Texture2D itemTexture, Rectangle srcRegion, TransactionButton_Layout styleSource, bool disabled, int displayPriorityOffset)
ControllerActionButton Button
const GUIControlsBanner.Action.ControlPriority MinRightControl
GUIControlsBanner.Action LTAction
bool AddAction(GUIControlsBanner.Action action, int maxWidth)
void ItemRightDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
GUIControlsBanner.Action LBAction
GUIControlsBanner.ActionGroup ButtonActions
GUIControlsBanner.Action RBAction
void AddAction(GUIControlsBanner.ActionSource source, ControllerActionVector action, string label, Texture2D itemTexture, Rectangle srcRegion, TransactionButton_Layout styleSource, bool disabled)
List< GUIControlsBanner.Action > currentActions
bool AddMore(int maxWidth)
void AddAction(GUIControlsBanner.ActionSource source, ControllerActionButton action, string label)
void DrawControl(TransactionButton_Layout layout, ControlsBanner_Layout.ControlGroupingPosition position, Vector2 offset, GUIControlsBanner.Action action, float scale)
int SortActionByDisplayPriority(GUIControlsBanner.Action x, GUIControlsBanner.Action y)
GUIControlsBanner.ActionGroup LSActions
void LoadControlPosition(TransactionButton_Layout layout, ControlsBanner_Layout.ControlGroupingPosition position, Vector2 offset)
List< GUIControlsBanner.Action > RightActions
List< GUIControlsBanner.Action >[] sourceActions
static GUIControllerInputButton.AxisControl FromAxis(Axis axis, float threshold)
Vector2 GetControlPoint(ControlsBanner_Layout.ControlGroupingPosition layoutItem)
float ItemScale(int index)
void AddAction(GUIControlsBanner.ActionSource source, ControllerActionButton action, string label, Texture2D itemTexture, TransactionButton_Layout styleSource, bool disabled)
GUIControlsBanner.Action RTAction
void AddAction(GUIControlsBanner.ActionSource source, ControllerActionVector action, string label, Texture2D itemTexture, TransactionButton_Layout styleSource, bool disabled)
static GUIControllerInputButton.LinkedControlType FromButton(Buttons button)
void ItemOver(int index)
GUIControlsBanner.ActionGroup RSActions
TransactionButton_Layout ActionStyleMultiple
string GetControlTag(ControllerActionVector action)
Rectangle ItemRightTextRegion(int index)
void AddAction(GUIControlsBanner.ActionSource source, ControllerActionVector action, string label)
TransactionButton_Layout ActionStyle
void AddAction(GUIControlsBanner.ActionSource source, ControllerActionButton action, string label, Texture2D itemTexture, Rectangle srcRegion, TransactionButton_Layout styleSource, bool disabled)
void DrawControlsBanner(GUIControlsBanner.ActionSource source)
GUIControlsBanner.ActionGroup DPadActions
List< GUIControlsBanner.Action > AllActions
Vector2 ItemSize(int index)
string GetControlTag(ControllerActionButton action)
List< GUIControlsBanner.Action > LeftActions
void ItemDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
StringBuilder Append(char value, int repeatCount)