52 {
55 uILinkPage.UpdateEvent += delegate
56 {
57 PlayerInput.GamepadAllowScrolling = true;
58 };
59 for (
int i = 0;
i < 20;
i++)
60 {
61 uILinkPage.
LinkMap.Add(2000 + i,
new UILinkPoint(2000 + i, enabled: true, -3, -4, -1, -2));
62 }
64 uILinkPage.UpdateEvent += delegate
65 {
67 if (Main.inputTextEscape)
68 {
69 Main.inputTextEscape = false;
70 flag11 = true;
71 }
73 {
75 }
76 UILinkPointNavigator.Shortcuts.BackButtonInUse = flag11;
78 };
79 uILinkPage.IsValidEvent += () => Main.gameMenu && !Main.MenuUI.IsVisible;
80 uILinkPage.CanEnterEvent += () => Main.gameMenu && !Main.MenuUI.IsVisible;
87 cp20.UpdateEvent += delegate
88 {
89 cp20.
LinkMap[2501].Right = (UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsRight ? 2502 : (-4));
91 {
92 cp20.
LinkMap[2501].Right = 2503;
93 }
94 cp20.
LinkMap[2502].Right = (UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsRight2 ? 2503 : (-4));
95 cp20.
LinkMap[2503].Left = (UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsRight ? 2502 : 2501);
96 };
100 cp20.EnterEvent += delegate
101 {
102 Main.player[Main.myPlayer].releaseInventory = false;
103 };
104 cp20.LeaveEvent += delegate
105 {
106 Main.npcChatRelease = false;
107 Main.player[Main.myPlayer].LockGamepadTileInteractions();
108 };
112 Func<string> value2 = delegate
113 {
116 };
118 for (int j = 0; j <= 49; j++)
119 {
121 uILinkPoint.OnSpecialInteracts += value2;
122 int num = j;
123 if (num < 10)
124 {
125 uILinkPoint.Up = -1;
126 }
127 if (num >= 40)
128 {
129 uILinkPoint.Down = -2;
130 }
131 if (num % 10 == 9)
132 {
133 uILinkPoint.Right = -4;
134 }
135 if (num % 10 == 0)
136 {
137 uILinkPoint.Left = -3;
138 }
139 cp19.
LinkMap.Add(j, uILinkPoint);
140 }
161 cp19.
LinkMap[300].OnSpecialInteracts += value3;
162 cp19.UpdateEvent += delegate
163 {
164 bool inReforgeMenu = Main.InReforgeMenu;
165 bool flag7 = Main.player[Main.myPlayer].chest != -1;
166 bool flag8 = Main.npcShop != 0;
167 TileEntity tileEntity = Main.LocalPlayer.tileEntityAnchor.GetTileEntity();
170 for (int num65 = 40; num65 <= 49; num65++)
171 {
172 if (inReforgeMenu)
173 {
174 cp19.
LinkMap[num65].Down = ((num65 < 45) ? 303 : 304);
175 }
176 else if (flag7)
177 {
178 cp19.
LinkMap[num65].Down = 400 + num65 - 40;
179 }
180 else if (flag8)
181 {
182 cp19.
LinkMap[num65].Down = 2700 + num65 - 40;
183 }
184 else if (num65 == 40)
185 {
186 cp19.
LinkMap[num65].Down = 311;
187 }
188 else
189 {
191 }
192 }
193 if (flag10)
194 {
195 for (int num66 = 40; num66 <= 47; num66++)
196 {
197 cp19.
LinkMap[num66].Down = 5100 + num66 - 40;
198 }
199 }
200 if (flag9)
201 {
202 for (int num67 = 44; num67 <= 45; num67++)
203 {
204 cp19.
LinkMap[num67].Down = 5000 + num67 - 44;
205 }
206 }
207 if (flag7)
208 {
218 }
219 else if (flag8)
220 {
230 }
231 else
232 {
245 }
252 {
254 }
256 {
258 }
260 {
262 }
264 {
266 }
268 {
270 }
271 cp19.PageOnLeft = 9;
272 if (Main.CreativeMenu.Enabled)
273 {
274 cp19.PageOnLeft = 1005;
275 }
276 if (Main.InReforgeMenu)
277 {
278 cp19.PageOnLeft = 5;
279 }
280 };
281 cp19.IsValidEvent += () => Main.playerInventory;
282 cp19.PageOnLeft = 9;
283 cp19.PageOnRight = 2;
287 Func<string> value4 = delegate
288 {
291 };
292 for (int k = 50; k <= 53; k++)
293 {
295 uILinkPoint2.OnSpecialInteracts += value4;
296 cp18.
LinkMap.Add(k, uILinkPoint2);
297 }
308 cp18.UpdateEvent += delegate
309 {
310 if (Main.player[Main.myPlayer].chest == -1 && Main.npcShop == 0)
311 {
314 }
315 else
316 {
319 }
320 };
321 cp18.IsValidEvent += () => Main.playerInventory;
322 cp18.PageOnLeft = 0;
323 cp18.PageOnRight = 2;
327 Func<string> value5 = delegate
328 {
331 };
332 for (int l = 54; l <= 57; l++)
333 {
335 uILinkPoint3.OnSpecialInteracts += value5;
336 cp17.
LinkMap.Add(l, uILinkPoint3);
337 }
348 cp17.UpdateEvent += delegate
349 {
350 if (Main.player[Main.myPlayer].chest == -1 && Main.npcShop == 0)
351 {
354 }
355 else
356 {
359 }
360 };
361 cp17.PageOnLeft = 0;
362 cp17.PageOnRight = 8;
366 Func<string> value6 = delegate
367 {
368 int num64 = UILinkPointNavigator.CurrentPoint - 100;
370 };
371 Func<string> value7 = delegate
372 {
373 int slot11 = UILinkPointNavigator.CurrentPoint - 120;
375 };
376 for (int m = 100; m <= 119; m++)
377 {
379 uILinkPoint4.OnSpecialInteracts += value6;
380 int num2 = m - 100;
381 if (num2 == 0)
382 {
383 uILinkPoint4.Up = 305;
384 }
385 if (num2 == 10)
386 {
387 uILinkPoint4.Up = 306;
388 }
389 if (num2 == 9 || num2 == 19)
390 {
391 uILinkPoint4.Down = -2;
392 }
393 if (num2 >= 10)
394 {
395 uILinkPoint4.Left = 120 + num2 % 10;
396 }
397 else if (num2 >= 3)
398 {
399 uILinkPoint4.Right = -4;
400 }
401 else
402 {
403 uILinkPoint4.Right = 312 + num2;
404 }
405 cp16.
LinkMap.Add(m, uILinkPoint4);
406 }
407 for (int n = 120; n <= 129; n++)
408 {
410 uILinkPoint4.OnSpecialInteracts += value7;
411 int num3 = n - 120;
412 if (num3 == 0)
413 {
414 uILinkPoint4.Up = 307;
415 }
416 if (num3 == 9)
417 {
418 uILinkPoint4.Down = 308;
419 uILinkPoint4.Left = 1557;
420 }
421 if (num3 == 8)
422 {
423 uILinkPoint4.Left = 1570;
424 }
425 cp16.
LinkMap.Add(n, uILinkPoint4);
426 }
427 for (int num4 = 312; num4 <= 314; num4++)
428 {
429 int num5 = num4 - 312;
431 if (num5 == 0)
432 {
433 uILinkPoint4.Up = -1;
434 }
435 if (num5 == 2)
436 {
437 uILinkPoint4.Down = -2;
438 }
439 uILinkPoint4.OnSpecialInteracts +=
value;
440 cp16.
LinkMap.Add(num4, uILinkPoint4);
441 }
442 cp16.IsValidEvent += () => Main.playerInventory && Main.EquipPage == 0;
443 cp16.UpdateEvent += delegate
444 {
445 int num60 = 107;
446 int amountOfExtraAccessorySlotsToShow = Main.player[Main.myPlayer].GetAmountOfExtraAccessorySlotsToShow();
447 for (int num61 = 0; num61 < amountOfExtraAccessorySlotsToShow; num61++)
448 {
449 cp16.
LinkMap[num60 + num61].Down = num60 + num61 + 1;
450 cp16.
LinkMap[num60 - 100 + 120 + num61].Down = num60 - 100 + 120 + num61 + 1;
451 cp16.
LinkMap[num60 + 10 + num61].Down = num60 + 10 + num61 + 1;
452 }
453 cp16.
LinkMap[num60 + amountOfExtraAccessorySlotsToShow].Down = 308;
454 cp16.
LinkMap[num60 + 10 + amountOfExtraAccessorySlotsToShow].Down = 308;
455 cp16.
LinkMap[num60 - 100 + 120 + amountOfExtraAccessorySlotsToShow].Down = 308;
456 bool shouldPVPDraw = Main.ShouldPVPDraw;
457 for (int num62 = 120; num62 <= 129; num62++)
458 {
460 int num63 = num62 - 120;
461 uILinkPoint17.Left = -3;
462 if (num63 == 0)
463 {
464 uILinkPoint17.Left = (shouldPVPDraw ? 1550 : (-3));
465 }
466 if (num63 == 1)
467 {
468 uILinkPoint17.Left = (shouldPVPDraw ? 1552 : (-3));
469 }
470 if (num63 == 2)
471 {
472 uILinkPoint17.Left = (shouldPVPDraw ? 1556 : (-3));
473 }
474 if (num63 == 3)
475 {
476 uILinkPoint17.Left = ((UILinkPointNavigator.Shortcuts.INFOACCCOUNT >= 1) ? 1558 : (-3));
477 }
478 if (num63 == 4)
479 {
480 uILinkPoint17.Left = ((UILinkPointNavigator.Shortcuts.INFOACCCOUNT >= 5) ? 1562 : (-3));
481 }
482 if (num63 == 5)
483 {
484 uILinkPoint17.Left = ((UILinkPointNavigator.Shortcuts.INFOACCCOUNT >= 9) ? 1566 : (-3));
485 }
486 }
487 cp16.
LinkMap[num60 - 100 + 120 + amountOfExtraAccessorySlotsToShow].Left = 1557;
488 cp16.
LinkMap[num60 - 100 + 120 + amountOfExtraAccessorySlotsToShow - 1].Left = 1570;
489 };
490 cp16.PageOnLeft = 8;
491 cp16.PageOnRight = 8;
495 Func<string> value8 = delegate
496 {
497 int slot10 = UILinkPointNavigator.CurrentPoint - 400;
498 int context = 4;
499 Item[]
item = Main.player[Main.myPlayer].bank.item;
500 switch (Main.player[Main.myPlayer].chest)
501 {
502 case -1:
503 return "";
504 case -3:
505 item = Main.player[Main.myPlayer].bank2.item;
506 break;
507 case -4:
508 item = Main.player[Main.myPlayer].bank3.item;
509 break;
510 case -5:
511 item = Main.player[Main.myPlayer].bank4.item;
512 context = 32;
513 break;
514 default:
515 item = Main.chest[Main.player[Main.myPlayer].chest].item;
516 context = 3;
517 break;
518 case -2:
519 break;
520 }
522 };
523 for (int num6 = 400; num6 <= 439; num6++)
524 {
525 UILinkPoint uILinkPoint5 =
new UILinkPoint(num6, enabled: true, num6 - 1, num6 + 1, num6 - 10, num6 + 10);
526 uILinkPoint5.OnSpecialInteracts += value8;
527 int num7 = num6 - 400;
528 if (num7 < 10)
529 {
530 uILinkPoint5.Up = 40 + num7;
531 }
532 if (num7 >= 30)
533 {
534 uILinkPoint5.Down = -2;
535 }
536 if (num7 % 10 == 9)
537 {
538 uILinkPoint5.Right = -4;
539 }
540 if (num7 % 10 == 0)
541 {
542 uILinkPoint5.Left = -3;
543 }
544 uILinkPage2.
LinkMap.Add(num6, uILinkPoint5);
545 }
560 uILinkPage2.
LinkMap[409].Right = 500;
561 uILinkPage2.
LinkMap[419].Right = 501;
562 uILinkPage2.
LinkMap[429].Right = 502;
563 uILinkPage2.
LinkMap[439].Right = 503;
564 uILinkPage2.
LinkMap[439].Down = 300;
565 uILinkPage2.
LinkMap[438].Down = 309;
566 uILinkPage2.
LinkMap[437].Down = 310;
567 uILinkPage2.PageOnLeft = 0;
568 uILinkPage2.PageOnRight = 0;
569 uILinkPage2.DefaultPoint = 400;
571 uILinkPage2.IsValidEvent += () => Main.playerInventory && Main.player[Main.myPlayer].chest != -1;
574 Func<string> value9 = delegate
575 {
576 int slot9 = UILinkPointNavigator.CurrentPoint - 5100;
577 return (!(Main.LocalPlayer.tileEntityAnchor.GetTileEntity() is
TEDisplayDoll tEDisplayDoll)) ?
"" : tEDisplayDoll.GetItemGamepadInstructions(slot9);
578 };
579 for (int num8 = 5100; num8 <= 5115; num8++)
580 {
582 uILinkPoint6.OnSpecialInteracts += value9;
583 int num9 = num8 - 5100;
584 if (num9 < 8)
585 {
586 uILinkPoint6.Up = 40 + num9;
587 }
588 if (num9 >= 8)
589 {
590 uILinkPoint6.Down = -2;
591 }
592 if (num9 % 8 == 7)
593 {
594 uILinkPoint6.Right = -4;
595 }
596 if (num9 % 8 == 0)
597 {
598 uILinkPoint6.Left = -3;
599 }
600 uILinkPage3.
LinkMap.Add(num8, uILinkPoint6);
601 }
602 uILinkPage3.PageOnLeft = 0;
603 uILinkPage3.PageOnRight = 0;
604 uILinkPage3.DefaultPoint = 5100;
606 uILinkPage3.IsValidEvent += () => Main.playerInventory && Main.LocalPlayer.tileEntityAnchor.GetTileEntity() is
TEDisplayDoll;
609 Func<string> value10 = delegate
610 {
611 int slot8 = UILinkPointNavigator.CurrentPoint - 5000;
612 return (!(Main.LocalPlayer.tileEntityAnchor.GetTileEntity() is
TEHatRack tEHatRack)) ?
"" : tEHatRack.GetItemGamepadInstructions(slot8);
613 };
614 for (int num10 = 5000; num10 <= 5003; num10++)
615 {
616 UILinkPoint uILinkPoint7 =
new UILinkPoint(num10, enabled: true, num10 - 1, num10 + 1, num10 - 2, num10 + 2);
617 uILinkPoint7.OnSpecialInteracts += value10;
618 int num11 = num10 - 5000;
619 if (num11 < 2)
620 {
621 uILinkPoint7.Up = 44 + num11;
622 }
623 if (num11 >= 2)
624 {
625 uILinkPoint7.Down = -2;
626 }
627 if (num11 % 2 == 1)
628 {
629 uILinkPoint7.Right = -4;
630 }
631 if (num11 % 2 == 0)
632 {
633 uILinkPoint7.Left = -3;
634 }
635 uILinkPage4.
LinkMap.Add(num10, uILinkPoint7);
636 }
637 uILinkPage4.PageOnLeft = 0;
638 uILinkPage4.PageOnRight = 0;
639 uILinkPage4.DefaultPoint = 5000;
641 uILinkPage4.IsValidEvent += () => Main.playerInventory && Main.LocalPlayer.tileEntityAnchor.GetTileEntity() is
TEHatRack;
644 Func<string> value11 = delegate
645 {
646 if (Main.npcShop == 0)
647 {
648 return "";
649 }
650 int slot7 = UILinkPointNavigator.CurrentPoint - 2700;
652 };
653 for (int num12 = 2700; num12 <= 2739; num12++)
654 {
655 UILinkPoint uILinkPoint8 =
new UILinkPoint(num12, enabled: true, num12 - 1, num12 + 1, num12 - 10, num12 + 10);
656 uILinkPoint8.OnSpecialInteracts += value11;
657 int num13 = num12 - 2700;
658 if (num13 < 10)
659 {
660 uILinkPoint8.Up = 40 + num13;
661 }
662 if (num13 >= 30)
663 {
664 uILinkPoint8.Down = -2;
665 }
666 if (num13 % 10 == 9)
667 {
668 uILinkPoint8.Right = -4;
669 }
670 if (num13 % 10 == 0)
671 {
672 uILinkPoint8.Left = -3;
673 }
674 uILinkPage5.
LinkMap.Add(num12, uILinkPoint8);
675 }
676 uILinkPage5.
LinkMap[2739].Down = 300;
677 uILinkPage5.
LinkMap[2738].Down = 309;
678 uILinkPage5.
LinkMap[2737].Down = 310;
679 uILinkPage5.PageOnLeft = 0;
680 uILinkPage5.PageOnRight = 0;
682 uILinkPage5.IsValidEvent += () => Main.playerInventory && Main.npcShop != 0;
688 cp15.
LinkMap[303].OnSpecialInteracts += value12;
689 cp15.
LinkMap[304].OnSpecialInteracts += () => Lang.misc[53].Value;
690 cp15.UpdateEvent += delegate
691 {
692 if (Main.reforgeItem.type > 0)
693 {
695 }
696 else
697 {
699 {
701 }
704 }
705 };
706 cp15.IsValidEvent += () => Main.playerInventory && Main.InReforgeMenu;
707 cp15.PageOnLeft = 0;
708 cp15.PageOnRight = 0;
709 cp15.EnterEvent += delegate
710 {
712 };
715 cp14.OnSpecialInteracts += delegate
716 {
717 bool flag5 = UILinkPointNavigator.CurrentPoint == 600;
720 {
721 Point point = Main.player[Main.myPlayer].Center.ToTileCoordinates();
722 if (flag5)
723 {
724 if (
WorldGen.MoveTownNPC(point.
X, point.
Y, -1))
725 {
726 Main.NewText(Lang.inter[39].Value, byte.MaxValue, 240, 20);
727 }
729 }
731 {
734 }
737 }
739 {
743 }
745 {
747 }
748 return PlayerInput.
BuildCommand(Lang.misc[56].Value,
false,
PlayerInput.
ProfileGamepadUI.KeyStatus[
"Inventory"]) +
PlayerInput.
BuildCommand(Lang.misc[64].Value,
false,
PlayerInput.
ProfileGamepadUI.KeyStatus[
"HotbarMinus"],
PlayerInput.
ProfileGamepadUI.KeyStatus[
"HotbarPlus"]) +
PlayerInput.
BuildCommand(Lang.misc[70].Value,
false,
PlayerInput.
ProfileGamepadUI.KeyStatus[
"Grapple"]) +
PlayerInput.
BuildCommand(Lang.misc[69].Value,
false,
PlayerInput.
ProfileGamepadUI.KeyStatus[
"SmartSelect"]) + (flag6 ?
PlayerInput.
BuildCommand(
"Evict",
false,
PlayerInput.
ProfileGamepadUI.KeyStatus[
"MouseRight"]) :
"");
749 };
750 for (int num14 = 600; num14 <= 650; num14++)
751 {
752 UILinkPoint value13 =
new UILinkPoint(num14, enabled: true, num14 + 10, num14 - 10, num14 - 1, num14 + 1);
753 cp14.
LinkMap.Add(num14, value13);
754 }
755 cp14.UpdateEvent += delegate
756 {
758 if (num58 == 0)
759 {
760 num58 = 100;
761 }
762 for (int num59 = 0; num59 < 50; num59++)
763 {
764 cp14.
LinkMap[600 + num59].Up = ((num59 % num58 == 0) ? (-1) : (600 + num59 - 1));
765 if (cp14.
LinkMap[600 + num59].Up == -1)
766 {
767 if (num59 >= num58 * 2)
768 {
769 cp14.
LinkMap[600 + num59].Up = 307;
770 }
771 else if (num59 >= num58)
772 {
773 cp14.
LinkMap[600 + num59].Up = 306;
774 }
775 else
776 {
777 cp14.
LinkMap[600 + num59].Up = 305;
778 }
779 }
781 cp14.
LinkMap[600 + num59].Left = ((num59 < UILinkPointNavigator.Shortcuts.NPCS_IconsTotal - num58) ? (600 + num59 + num58) : (-3));
782 cp14.
LinkMap[600 + num59].Right = ((num59 < num58) ? (-4) : (600 + num59 - num58));
783 }
784 };
785 cp14.IsValidEvent += () => Main.playerInventory && Main.EquipPage == 1;
786 cp14.PageOnLeft = 8;
787 cp14.PageOnRight = 8;
791 Func<string> value14 = delegate
792 {
793 int slot6 = UILinkPointNavigator.CurrentPoint - 180;
795 };
796 Func<string> value15 = delegate
797 {
798 int slot5 = UILinkPointNavigator.CurrentPoint - 180;
800 };
801 Func<string> value16 = delegate
802 {
803 int slot4 = UILinkPointNavigator.CurrentPoint - 180;
805 };
806 Func<string> value17 = delegate
807 {
808 int slot3 = UILinkPointNavigator.CurrentPoint - 180;
810 };
811 Func<string> value18 = delegate
812 {
813 int slot2 = UILinkPointNavigator.CurrentPoint - 180;
815 };
816 Func<string> value19 = delegate
817 {
818 int slot = UILinkPointNavigator.CurrentPoint - 185;
820 };
821 for (int num15 = 180; num15 <= 184; num15++)
822 {
823 UILinkPoint uILinkPoint9 =
new UILinkPoint(num15, enabled: true, 185 + num15 - 180, -4, num15 - 1, num15 + 1);
824 int num16 = num15 - 180;
825 if (num16 == 0)
826 {
827 uILinkPoint9.Up = 305;
828 }
829 if (num16 == 4)
830 {
831 uILinkPoint9.Down = 308;
832 }
833 cp13.
LinkMap.Add(num15, uILinkPoint9);
834 switch (num15)
835 {
836 case 180:
837 uILinkPoint9.OnSpecialInteracts += value15;
838 break;
839 case 181:
840 uILinkPoint9.OnSpecialInteracts += value14;
841 break;
842 case 182:
843 uILinkPoint9.OnSpecialInteracts += value16;
844 break;
845 case 183:
846 uILinkPoint9.OnSpecialInteracts += value17;
847 break;
848 case 184:
849 uILinkPoint9.OnSpecialInteracts += value18;
850 break;
851 }
852 }
853 for (int num17 = 185; num17 <= 189; num17++)
854 {
856 uILinkPoint9.OnSpecialInteracts += value19;
857 int num18 = num17 - 185;
858 if (num18 == 0)
859 {
860 uILinkPoint9.Up = 306;
861 }
862 if (num18 == 4)
863 {
864 uILinkPoint9.Down = 308;
865 }
866 cp13.
LinkMap.Add(num17, uILinkPoint9);
867 }
868 cp13.UpdateEvent += delegate
869 {
870 cp13.
LinkMap[184].Down = ((UILinkPointNavigator.Shortcuts.BUFFS_DRAWN > 0) ? 9000 : 308);
871 cp13.
LinkMap[189].Down = ((UILinkPointNavigator.Shortcuts.BUFFS_DRAWN > 0) ? 9000 : 308);
872 };
873 cp13.IsValidEvent += () => Main.playerInventory && Main.EquipPage == 2;
874 cp13.PageOnLeft = 8;
875 cp13.PageOnRight = 8;
887 cp12.UpdateEvent += delegate
888 {
889 switch (Main.EquipPage)
890 {
891 case 0:
895 cp12.
LinkMap[308].Up = 108 + Main.player[Main.myPlayer].GetAmountOfExtraAccessorySlotsToShow() - 1;
896 break;
897 case 1:
898 {
903 if (num57 == 0)
904 {
905 num57 = 100;
906 }
907 if (num57 == 100)
908 {
910 }
911 cp12.
LinkMap[308].Up = 600 + num57 - 1;
912 break;
913 }
914 case 2:
918 cp12.
LinkMap[308].Up = ((UILinkPointNavigator.Shortcuts.BUFFS_DRAWN > 0) ? 9000 : 184);
919 break;
920 }
922 };
923 cp12.IsValidEvent += () => Main.playerInventory;
924 cp12.PageOnLeft = 0;
925 cp12.PageOnRight = 0;
931 for (int num19 = 1500; num19 < 1550; num19++)
932 {
934 if (num19 != 1500)
935 {
936 uILinkPoint10.OnSpecialInteracts += HandleItem2;
937 }
938 cp11.
LinkMap.Add(num19, uILinkPoint10);
939 }
940 cp11.
LinkMap[1500].OnSpecialInteracts += value20;
941 cp11.UpdateEvent += delegate
942 {
944 int num55 = num54;
945 if (Main.numAvailableRecipes > 0)
946 {
947 num55 += 2;
948 }
949 if (num54 < num55)
950 {
951 num54 = num55;
952 }
954 {
956 }
958 {
960 }
961 for (int num56 = 1; num56 < num54; num56++)
962 {
963 cp11.
LinkMap[1500 + num56].Left = 1500 + num56 - 1;
964 cp11.
LinkMap[1500 + num56].Right = ((num56 == num54 - 2) ? (-4) : (1500 + num56 + 1));
965 }
967 if (num54 > 0)
968 {
969 cp11.
LinkMap[1500 + num54 - 1].Right = -4;
970 }
971 cp11.
LinkMap[1500].Down = ((num54 >= 2) ? 1502 : (-2));
972 cp11.
LinkMap[1500].Left = ((num54 >= 1) ? 1501 : (-3));
973 cp11.
LinkMap[1502].Up = (Main.InGuideCraftMenu ? 1500 : (-1));
974 };
975 cp11.
LinkMap[1501].OnSpecialInteracts += delegate
976 {
977 if (Main.InGuideCraftMenu)
978 {
979 return "";
980 }
981 string text2 = "";
982 Player player2 = Main.player[Main.myPlayer];
983 bool flag3 = false;
984 Item createItem = Main.recipe[Main.availableRecipe[Main.focusRecipe]].createItem;
985 if (Main.mouseItem.type == 0 && createItem.maxStack > 1 && player2.ItemSpace(createItem).CanTakeItemToPersonalInventory && !player2.HasLockedInventory())
986 {
987 flag3 = true;
989 {
991 {
992 SomeVarsForUILinkers.SequencedCraftingCurrent = Main.recipe[Main.availableRecipe[Main.focusRecipe]];
993 }
995 Main.preventStackSplitReset = true;
996 if (SomeVarsForUILinkers.SequencedCraftingCurrent == Main.recipe[Main.availableRecipe[Main.focusRecipe]])
997 {
998 Main.CraftItem(Main.recipe[Main.availableRecipe[Main.focusRecipe]]);
999 Main.mouseItem = player2.GetItem(player2.whoAmI, Main.mouseItem, new GetItemSettings(LongText: false, NoText: true));
1000 }
1001 }
1002 }
1003 else if (Main.mouseItem.type > 0 && Main.mouseItem.maxStack == 1 &&
ItemSlot.
Equippable(ref Main.mouseItem))
1004 {
1007 {
1009 if (Main.player[Main.myPlayer].ItemSpace(Main.mouseItem).CanTakeItemToPersonalInventory)
1010 {
1011 Main.mouseItem = player2.GetItem(player2.whoAmI, Main.mouseItem, GetItemSettings.InventoryUIToInventorySettings);
1012 }
1015 }
1016 }
1017 bool flag4 = Main.mouseItem.stack <= 0;
1018 if (flag4 || (Main.mouseItem.type == createItem.type && Main.mouseItem.stack < Main.mouseItem.maxStack))
1019 {
1021 }
1022 if (!flag4 && Main.mouseItem.type == createItem.type && Main.mouseItem.stack < Main.mouseItem.maxStack)
1023 {
1025 }
1026 if (flag3)
1027 {
1029 }
1030 return text2 + HandleItem2();
1031 };
1032 cp11.ReachEndEvent += delegate(int current, int next)
1033 {
1034 switch (current)
1035 {
1036 case 1501:
1037 switch (next)
1038 {
1039 case -1:
1040 if (Main.focusRecipe > 0)
1041 {
1042 Main.focusRecipe--;
1043 }
1044 break;
1045 case -2:
1046 if (Main.focusRecipe < Main.numAvailableRecipes - 1)
1047 {
1048 Main.focusRecipe++;
1049 }
1050 break;
1051 }
1052 break;
1053 default:
1054 switch (next)
1055 {
1056 case -1:
1057 if (Main.focusRecipe > 0)
1058 {
1060 Main.focusRecipe--;
1061 }
1062 break;
1063 case -2:
1064 if (Main.focusRecipe < Main.numAvailableRecipes - 1)
1065 {
1067 Main.focusRecipe++;
1068 }
1069 break;
1070 }
1071 break;
1072 case 1500:
1073 break;
1074 }
1075 };
1076 cp11.EnterEvent += delegate
1077 {
1078 Main.recBigList = false;
1080 };
1081 cp11.CanEnterEvent += () => Main.playerInventory && (Main.numAvailableRecipes > 0 || Main.InGuideCraftMenu);
1082 cp11.IsValidEvent += () => Main.playerInventory && (Main.numAvailableRecipes > 0 || Main.InGuideCraftMenu);
1083 cp11.PageOnLeft = 10;
1084 cp11.PageOnRight = 0;
1088 for (int num20 = 700; num20 < 1500; num20++)
1089 {
1091 int IHateLambda = num20;
1092 uILinkPoint11.OnSpecialInteracts += delegate
1093 {
1095 bool flag2 = false;
1096 Player player = Main.player[Main.myPlayer];
1097 if (IHateLambda + Main.recStart < Main.numAvailableRecipes)
1098 {
1099 int num53 = Main.recStart + IHateLambda - 700;
1100 if (Main.mouseItem.type == 0 && Main.recipe[Main.availableRecipe[num53]].createItem.maxStack > 1 && player.ItemSpace(Main.recipe[Main.availableRecipe[num53]].createItem).CanTakeItemToPersonalInventory && !player.HasLockedInventory())
1101 {
1102 flag2 = true;
1104 {
1105 SomeVarsForUILinkers.SequencedCraftingCurrent = Main.recipe[Main.availableRecipe[num53]];
1106 }
1108 {
1110 if (SomeVarsForUILinkers.SequencedCraftingCurrent == Main.recipe[Main.availableRecipe[num53]])
1111 {
1112 Main.CraftItem(Main.recipe[Main.availableRecipe[num53]]);
1113 Main.mouseItem = player.GetItem(player.whoAmI, Main.mouseItem, GetItemSettings.InventoryUIToInventorySettings);
1114 }
1115 }
1116 }
1117 }
1119 if (flag2)
1120 {
1122 }
1124 };
1125 cp10.
LinkMap.Add(num20, uILinkPoint11);
1126 }
1127 cp10.UpdateEvent += delegate
1128 {
1131 if (num50 == 0)
1132 {
1133 num50 = 100;
1134 }
1135 int num51 = num50 * cRAFT_IconsPerColumn;
1136 if (num51 > 800)
1137 {
1138 num51 = 800;
1139 }
1140 if (num51 > Main.numAvailableRecipes)
1141 {
1142 num51 = Main.numAvailableRecipes;
1143 }
1144 for (int num52 = 0; num52 < num51; num52++)
1145 {
1146 cp10.
LinkMap[700 + num52].Left = ((num52 % num50 == 0) ? (-3) : (700 + num52 - 1));
1147 cp10.
LinkMap[700 + num52].Right = (((num52 + 1) % num50 == 0 || num52 == Main.numAvailableRecipes - 1) ? (-4) : (700 + num52 + 1));
1148 cp10.
LinkMap[700 + num52].Down = ((num52 < num51 - num50) ? (700 + num52 + num50) : (-2));
1149 cp10.
LinkMap[700 + num52].Up = ((num52 < num50) ? (-1) : (700 + num52 - num50));
1150 }
1152 };
1153 cp10.ReachEndEvent += delegate(int current, int next)
1154 {
1156 switch (next)
1157 {
1158 case -1:
1159 Main.recStart -= cRAFT_IconsPerRow;
1160 if (Main.recStart < 0)
1161 {
1162 Main.recStart = 0;
1163 }
1164 break;
1165 case -2:
1166 Main.recStart += cRAFT_IconsPerRow;
1168 if (Main.recStart > Main.numAvailableRecipes - cRAFT_IconsPerRow)
1169 {
1170 Main.recStart = Main.numAvailableRecipes - cRAFT_IconsPerRow;
1171 }
1172 break;
1173 }
1174 };
1175 cp10.EnterEvent += delegate
1176 {
1177 Main.recBigList = true;
1178 };
1179 cp10.LeaveEvent += delegate
1180 {
1181 Main.recBigList = false;
1182 };
1183 cp10.CanEnterEvent += () => Main.playerInventory && Main.numAvailableRecipes > 0;
1184 cp10.IsValidEvent += () => Main.playerInventory && Main.recBigList && Main.numAvailableRecipes > 0;
1185 cp10.PageOnLeft = 0;
1186 cp10.PageOnRight = 9;
1190 for (int num21 = 2605; num21 < 2620; num21++)
1191 {
1194 cp9.
LinkMap.Add(num21, uILinkPoint12);
1195 }
1196 cp9.UpdateEvent += delegate
1197 {
1198 int num46 = 5;
1199 int num47 = 3;
1200 int num48 = num46 * num47;
1201 int count = Main.Hairstyles.AvailableHairstyles.Count;
1202 for (int num49 = 0; num49 < num48; num49++)
1203 {
1204 cp9.
LinkMap[2605 + num49].Left = ((num49 % num46 == 0) ? (-3) : (2605 + num49 - 1));
1205 cp9.
LinkMap[2605 + num49].Right = (((num49 + 1) % num46 == 0 || num49 ==
count - 1) ? (-4) : (2605 + num49 + 1));
1206 cp9.
LinkMap[2605 + num49].Down = ((num49 < num48 - num46) ? (2605 + num49 + num46) : (-2));
1207 cp9.
LinkMap[2605 + num49].Up = ((num49 < num46) ? (-1) : (2605 + num49 - num46));
1208 }
1209 };
1210 cp9.ReachEndEvent += delegate(int current, int next)
1211 {
1212 int num45 = 5;
1213 switch (next)
1214 {
1215 case -1:
1216 Main.hairStart -= num45;
1218 break;
1219 case -2:
1220 Main.hairStart += num45;
1222 break;
1223 }
1224 };
1225 cp9.CanEnterEvent += () => Main.hairWindow;
1226 cp9.IsValidEvent += () => Main.hairWindow;
1227 cp9.PageOnLeft = 12;
1228 cp9.PageOnRight = 12;
1232 uILinkPage6.
LinkMap.Add(2600,
new UILinkPoint(2600, enabled: true, -3, -4, -1, 2601));
1233 uILinkPage6.
LinkMap.Add(2601,
new UILinkPoint(2601, enabled: true, -3, -4, 2600, 2602));
1234 uILinkPage6.
LinkMap.Add(2602,
new UILinkPoint(2602, enabled: true, -3, -4, 2601, 2603));
1235 uILinkPage6.
LinkMap.Add(2603,
new UILinkPoint(2603, enabled: true, -3, 2604, 2602, -2));
1236 uILinkPage6.
LinkMap.Add(2604,
new UILinkPoint(2604, enabled: true, 2603, -4, 2602, -2));
1237 uILinkPage6.UpdateEvent += delegate
1238 {
1239 Vector3 value23 = Main.rgbToHsl(Main.selColor);
1242 x2 = ((!(x2 < 0f - interfaceDeadzoneX2) && !(x2 > interfaceDeadzoneX2)) ? 0f : (
MathHelper.Lerp(0f, 1f / 120f, (
Math.
Abs(x2) - interfaceDeadzoneX2) / (1f - interfaceDeadzoneX2)) * (float)
Math.
Sign(x2)));
1244 if (currentPoint2 == 2600)
1245 {
1247 }
1248 if (currentPoint2 == 2601)
1249 {
1251 }
1252 if (currentPoint2 == 2602)
1253 {
1255 }
1257 if (x2 != 0f)
1258 {
1259 if (Main.hairWindow)
1260 {
1261 Main.player[Main.myPlayer].hairColor = (Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar));
1262 }
1264 }
1265 };
1266 uILinkPage6.CanEnterEvent += () => Main.hairWindow;
1267 uILinkPage6.IsValidEvent += () => Main.hairWindow;
1268 uILinkPage6.PageOnLeft = 11;
1269 uILinkPage6.PageOnRight = 11;
1272 for (int num22 = 0; num22 < 30; num22++)
1273 {
1274 cp8.
LinkMap.Add(2900 + num22,
new UILinkPoint(2900 + num22, enabled: true, -3, -4, -1, -2));
1276 }
1278 cp8.TravelEvent += delegate
1279 {
1281 {
1282 int num44 = cp8.CurrentPoint - 2900;
1283 if (num44 < 5)
1284 {
1285 IngameOptions.category = num44;
1286 }
1287 }
1288 };
1289 cp8.UpdateEvent += delegate
1290 {
1292 if (num40 == 0)
1293 {
1294 num40 = 5;
1295 }
1297 {
1299 }
1300 for (int num41 = 2900; num41 < 2900 + num40; num41++)
1301 {
1302 cp8.
LinkMap[num41].Up = num41 - 1;
1303 cp8.
LinkMap[num41].Down = num41 + 1;
1304 }
1305 cp8.
LinkMap[2900].Up = 2900 + num40 - 1;
1306 cp8.
LinkMap[2900 + num40 - 1].Down = 2900;
1307 int num42 = cp8.CurrentPoint - 2900;
1309 {
1310 IngameOptions.category = num42;
1312 }
1313 int num43 = ((SocialAPI.Network !=
null &&
SocialAPI.
Network.CanInvite()) ? 1 : 0);
1315 {
1317 }
1318 };
1319 cp8.EnterEvent += delegate
1320 {
1321 cp8.CurrentPoint = 2900 + IngameOptions.category;
1322 };
1323 cp8.PageOnLeft = (cp8.PageOnRight = 1002);
1324 cp8.IsValidEvent += () => Main.ingameOptionsWindow && !Main.InGameUI.IsVisible;
1325 cp8.CanEnterEvent += () => Main.ingameOptionsWindow && !Main.InGameUI.IsVisible;
1328 for (int num23 = 0; num23 < 30; num23++)
1329 {
1330 cp7.
LinkMap.Add(2930 + num23,
new UILinkPoint(2930 + num23, enabled: true, -3, -4, -1, -2));
1332 }
1333 cp7.EnterEvent += delegate
1334 {
1335 Main.mouseLeftRelease = false;
1336 };
1338 cp7.UpdateEvent += delegate
1339 {
1341 if (num38 == 0)
1342 {
1343 num38 = 5;
1344 }
1346 {
1348 }
1349 for (int num39 = 2930; num39 < 2930 + num38; num39++)
1350 {
1351 cp7.
LinkMap[num39].Up = num39 - 1;
1352 cp7.
LinkMap[num39].Down = num39 + 1;
1353 }
1355 cp7.
LinkMap[2930 + num38 - 1].Down = -2;
1357 };
1358 cp7.PageOnLeft = (cp7.PageOnRight = 1001);
1359 cp7.IsValidEvent += () => Main.ingameOptionsWindow;
1360 cp7.CanEnterEvent += () => Main.ingameOptionsWindow;
1364 for (int num24 = 1550; num24 < 1558; num24++)
1365 {
1367 switch (num24)
1368 {
1369 case 1551:
1370 case 1553:
1371 case 1555:
1372 uILinkPoint13.Up = uILinkPoint13.ID - 2;
1373 uILinkPoint13.Down = uILinkPoint13.ID + 2;
1374 uILinkPoint13.Right = uILinkPoint13.ID + 1;
1375 break;
1376 case 1552:
1377 case 1554:
1378 case 1556:
1379 uILinkPoint13.Up = uILinkPoint13.ID - 2;
1380 uILinkPoint13.Down = uILinkPoint13.ID + 2;
1381 uILinkPoint13.Left = uILinkPoint13.ID - 1;
1382 break;
1383 }
1384 cp6.
LinkMap.Add(num24, uILinkPoint13);
1385 }
1386 cp6.
LinkMap[1550].Down = 1551;
1387 cp6.
LinkMap[1550].Right = 120;
1391 cp6.
LinkMap[1552].Right = 121;
1392 cp6.
LinkMap[1554].Right = 121;
1393 cp6.
LinkMap[1555].Down = 1570;
1394 cp6.
LinkMap[1556].Down = 1570;
1395 cp6.
LinkMap[1556].Right = 122;
1398 cp6.
LinkMap[1557].Right = 127;
1401 cp6.
LinkMap[1570].Down = 1557;
1402 cp6.
LinkMap[1570].Right = 126;
1403 for (int num25 = 0; num25 < 7; num25++)
1404 {
1406 }
1407 cp6.UpdateEvent += delegate
1408 {
1409 if (!Main.ShouldPVPDraw)
1410 {
1412 {
1414 }
1417 cp6.
LinkMap[1557].Right = 127;
1418 }
1419 else
1420 {
1423 cp6.
LinkMap[1557].Right = 127;
1424 }
1426 if (iNFOACCCOUNT2 > 0)
1427 {
1428 cp6.
LinkMap[1570].Up = 1558 + (iNFOACCCOUNT2 - 1) / 2 * 2;
1429 }
1430 if (Main.ShouldPVPDraw)
1431 {
1432 if (iNFOACCCOUNT2 >= 1)
1433 {
1434 cp6.
LinkMap[1555].Down = 1558;
1435 cp6.
LinkMap[1556].Down = 1558;
1436 }
1437 else
1438 {
1439 cp6.
LinkMap[1555].Down = 1570;
1440 cp6.
LinkMap[1556].Down = 1570;
1441 }
1442 if (iNFOACCCOUNT2 >= 2)
1443 {
1444 cp6.
LinkMap[1556].Down = 1559;
1445 }
1446 else
1447 {
1448 cp6.
LinkMap[1556].Down = 1570;
1449 }
1450 }
1451 };
1452 cp6.IsValidEvent += () => Main.playerInventory;
1453 cp6.PageOnLeft = 8;
1454 cp6.PageOnRight = 8;
1458 for (int num26 = 1558; num26 < 1570; num26++)
1459 {
1461 uILinkPoint14.OnSpecialInteracts +=
value;
1462 switch (num26)
1463 {
1464 case 1559:
1465 case 1561:
1466 case 1563:
1467 uILinkPoint14.Up = uILinkPoint14.ID - 2;
1468 uILinkPoint14.Down = uILinkPoint14.ID + 2;
1469 uILinkPoint14.Right = uILinkPoint14.ID + 1;
1470 break;
1471 case 1560:
1472 case 1562:
1473 case 1564:
1474 uILinkPoint14.Up = uILinkPoint14.ID - 2;
1475 uILinkPoint14.Down = uILinkPoint14.ID + 2;
1476 uILinkPoint14.Left = uILinkPoint14.ID - 1;
1477 break;
1478 }
1479 cp5.
LinkMap.Add(num26, uILinkPoint14);
1480 }
1481 cp5.UpdateEvent += delegate
1482 {
1485 {
1487 }
1488 for (int num36 = 0; num36 < iNFOACCCOUNT; num36++)
1489 {
1490 bool flag = num36 % 2 == 0;
1491 int num37 = num36 + 1558;
1492 cp5.
LinkMap[num37].Down = ((num36 < iNFOACCCOUNT - 2) ? (num37 + 2) : 1570);
1493 cp5.
LinkMap[num37].Up = ((num36 > 1) ? (num37 - 2) : (Main.ShouldPVPDraw ? (flag ? 1555 : 1556) : (-1)));
1494 cp5.
LinkMap[num37].Right = ((flag && num36 + 1 < iNFOACCCOUNT) ? (num37 + 1) : (123 + num36 / 4));
1495 cp5.
LinkMap[num37].Left = (flag ? (-3) : (num37 - 1));
1496 }
1497 };
1499 cp5.PageOnLeft = 8;
1500 cp5.PageOnRight = 8;
1504 for (int num27 = 6000; num27 < 6012; num27++)
1505 {
1507 switch (num27)
1508 {
1509 case 6000:
1510 uILinkPoint15.Right = 0;
1511 break;
1512 case 6001:
1513 case 6002:
1514 uILinkPoint15.Right = 10;
1515 break;
1516 case 6003:
1517 case 6004:
1518 uILinkPoint15.Right = 20;
1519 break;
1520 case 6005:
1521 case 6006:
1522 uILinkPoint15.Right = 30;
1523 break;
1524 default:
1525 uILinkPoint15.Right = 40;
1526 break;
1527 }
1528 cp4.
LinkMap.Add(num27, uILinkPoint15);
1529 }
1530 cp4.UpdateEvent += delegate
1531 {
1534 {
1536 }
1537 for (int num34 = 0; num34 < bUILDERACCCOUNT; num34++)
1538 {
1539 _ = num34 % 2;
1540 int num35 = num34 + 6000;
1541 cp4.
LinkMap[num35].Down = ((num34 < bUILDERACCCOUNT - 1) ? (num35 + 1) : (-2));
1542 cp4.
LinkMap[num35].Up = ((num34 > 0) ? (num35 - 1) : (-1));
1543 }
1544 };
1546 cp4.PageOnLeft = 8;
1547 cp4.PageOnRight = 8;
1551 uILinkPage7.
LinkMap.Add(2806,
new UILinkPoint(2806, enabled: true, 2805, 2807, -1, 2808));
1552 uILinkPage7.
LinkMap.Add(2807,
new UILinkPoint(2807, enabled: true, 2806, 2810, -1, 2809));
1553 uILinkPage7.
LinkMap.Add(2808,
new UILinkPoint(2808, enabled: true, 2805, 2809, 2806, -2));
1554 uILinkPage7.
LinkMap.Add(2809,
new UILinkPoint(2809, enabled: true, 2808, 2811, 2807, -2));
1555 uILinkPage7.
LinkMap.Add(2810,
new UILinkPoint(2810, enabled: true, 2807, -4, -1, 2811));
1556 uILinkPage7.
LinkMap.Add(2811,
new UILinkPoint(2811, enabled: true, 2809, -4, 2810, -2));
1557 uILinkPage7.
LinkMap.Add(2805,
new UILinkPoint(2805, enabled: true, -3, 2806, -1, -2));
1563 uILinkPage7.CanEnterEvent += () => Main.clothesWindow;
1564 uILinkPage7.IsValidEvent += () => Main.clothesWindow;
1565 uILinkPage7.EnterEvent += delegate
1566 {
1567 Main.player[Main.myPlayer].releaseInventory = false;
1568 };
1569 uILinkPage7.LeaveEvent += delegate
1570 {
1571 Main.player[Main.myPlayer].LockGamepadTileInteractions();
1572 };
1573 uILinkPage7.PageOnLeft = 15;
1574 uILinkPage7.PageOnRight = 15;
1578 uILinkPage8.
LinkMap.Add(2800,
new UILinkPoint(2800, enabled: true, -3, -4, -1, 2801));
1579 uILinkPage8.
LinkMap.Add(2801,
new UILinkPoint(2801, enabled: true, -3, -4, 2800, 2802));
1580 uILinkPage8.
LinkMap.Add(2802,
new UILinkPoint(2802, enabled: true, -3, -4, 2801, 2803));
1581 uILinkPage8.
LinkMap.Add(2803,
new UILinkPoint(2803, enabled: true, -3, 2804, 2802, -2));
1582 uILinkPage8.
LinkMap.Add(2804,
new UILinkPoint(2804, enabled: true, 2803, -4, 2802, -2));
1588 uILinkPage8.UpdateEvent += delegate
1589 {
1590 Vector3 value22 = Main.rgbToHsl(Main.selColor);
1593 x = ((!(x < 0f - interfaceDeadzoneX) && !(x > interfaceDeadzoneX)) ? 0f : (
MathHelper.Lerp(0f, 1f / 120f, (
Math.
Abs(x) - interfaceDeadzoneX) / (1f - interfaceDeadzoneX)) * (float)
Math.
Sign(x)));
1595 if (currentPoint == 2800)
1596 {
1598 }
1599 if (currentPoint == 2801)
1600 {
1602 }
1603 if (currentPoint == 2802)
1604 {
1606 }
1608 if (x != 0f)
1609 {
1610 if (Main.clothesWindow)
1611 {
1612 Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar);
1613 switch (Main.selClothes)
1614 {
1615 case 0:
1616 Main.player[Main.myPlayer].shirtColor = Main.selColor;
1617 break;
1618 case 1:
1619 Main.player[Main.myPlayer].underShirtColor = Main.selColor;
1620 break;
1621 case 2:
1622 Main.player[Main.myPlayer].pantsColor = Main.selColor;
1623 break;
1624 case 3:
1625 Main.player[Main.myPlayer].shoeColor = Main.selColor;
1626 break;
1627 }
1628 }
1630 }
1631 };
1632 uILinkPage8.CanEnterEvent += () => Main.clothesWindow;
1633 uILinkPage8.IsValidEvent += () => Main.clothesWindow;
1634 uILinkPage8.EnterEvent += delegate
1635 {
1636 Main.player[Main.myPlayer].releaseInventory = false;
1637 };
1638 uILinkPage8.LeaveEvent += delegate
1639 {
1640 Main.player[Main.myPlayer].LockGamepadTileInteractions();
1641 };
1642 uILinkPage8.PageOnLeft = 14;
1643 uILinkPage8.PageOnRight = 14;
1646 cp3.UpdateEvent += delegate
1647 {
1648 PlayerInput.GamepadAllowScrolling = true;
1649 };
1650 for (int num28 = 3000; num28 <= 4999; num28++)
1651 {
1653 }
1655 cp3.UpdateEvent += delegate
1656 {
1658 {
1660 }
1661 UILinkPointNavigator.Shortcuts.BackButtonInUse = false;
1662 };
1663 cp3.EnterEvent += delegate
1664 {
1665 cp3.CurrentPoint = 3002;
1666 };
1667 cp3.CanEnterEvent += () => Main.MenuUI.IsVisible || Main.InGameUI.IsVisible;
1668 cp3.IsValidEvent += () => Main.MenuUI.IsVisible || Main.InGameUI.IsVisible;
1672 cp2.UpdateEvent += delegate
1673 {
1674 PlayerInput.GamepadAllowScrolling = true;
1675 };
1676 for (int num29 = 10000; num29 <= 11000; num29++)
1677 {
1679 }
1680 for (int num30 = 15000; num30 <= 15000; num30++)
1681 {
1683 }
1685 cp2.UpdateEvent += delegate
1686 {
1688 {
1690 }
1691 UILinkPointNavigator.Shortcuts.BackButtonInUse = false;
1692 };
1693 cp2.EnterEvent += delegate
1694 {
1695 cp2.CurrentPoint = 10000;
1696 };
1700 cp2.PageOnLeft = 8;
1701 cp2.PageOnRight = 0;
1706 for (int num31 = 9000; num31 <= 9050; num31++)
1707 {
1708 UILinkPoint uILinkPoint16 =
new UILinkPoint(num31, enabled: true, num31 + 10, num31 - 10, num31 - 1, num31 + 1);
1709 cp.
LinkMap.Add(num31, uILinkPoint16);
1710 uILinkPoint16.OnSpecialInteracts += value21;
1711 }
1712 cp.UpdateEvent += delegate
1713 {
1715 if (num32 == 0)
1716 {
1717 num32 = 100;
1718 }
1719 for (int num33 = 0; num33 < 50; num33++)
1720 {
1721 cp.
LinkMap[9000 + num33].Up = ((num33 % num32 == 0) ? (-1) : (9000 + num33 - 1));
1722 if (cp.
LinkMap[9000 + num33].Up == -1)
1723 {
1724 if (num33 >= num32)
1725 {
1726 cp.
LinkMap[9000 + num33].Up = 184;
1727 }
1728 else
1729 {
1730 cp.
LinkMap[9000 + num33].Up = 189;
1731 }
1732 }
1734 cp.
LinkMap[9000 + num33].Left = ((num33 < UILinkPointNavigator.Shortcuts.BUFFS_DRAWN - num32) ? (9000 + num33 + num32) : (-3));
1735 cp.
LinkMap[9000 + num33].Right = ((num33 < num32) ? (-4) : (9000 + num33 - num32));
1736 }
1737 };
1739 cp.PageOnLeft = 8;
1740 cp.PageOnRight = 8;
1744 uILinkPage9.
Enter();
1745 }
static float Clamp(float value, float min, float max)
static void PlaySound(int type, Vector2 position, int style=1)
static bool NothingMoreImportantThanNPCChat()
static string FancyUISpecialInstructions()
static void OnFancyUIPageMoveAttempt(int direction)
static void HandleOptionsSpecials()
static int GetCornerWrapPageIdFromLeftToRight()
static int GetCornerWrapPageIdFromRightToLeft()
static bool CanExecuteInputCommand()
static bool CanEnterCreativeMenu()
static Terraria.Social.Base.NetSocialModule Network
Dictionary< int, UILinkPoint > LinkMap
static int BUILDERACCCOUNT
static int CRAFT_CurrentIngredientsCount
static bool NPCCHAT_ButtonsRight2
static int CRAFT_IconsPerRow
static int NPCS_IconsPerColumn
static int BUFFS_PER_COLUMN
static int CRAFT_IconsPerColumn
static int INGAMEOPTIONS_BUTTONS_RIGHT
static bool NPCS_IconsDisplay
static int NPCS_IconsTotal
static int INGAMEOPTIONS_BUTTONS_LEFT
static int NPCS_LastHovered
static void ChangePoint(int PointID)
static void ChangePage(int PageID)
static void RegisterPage(UILinkPage page, int ID, bool automatedDefault=true)
static Dictionary< int, UILinkPage > Pages
static void SwapEquip(ref Item inv, int context=0)
static bool Equippable(ref Item inv, int context=0)
static string GetGamepadInstructions(ref Item inv, int context=0)
static void RefreshStackSplitCooldown()
static Vector3 Clamp(Vector3 value1, Vector3 min, Vector3 max)