Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ SetupGamepadPoints()

void Terraria.GameContent.UI.States.UIBestiaryTest.SetupGamepadPoints ( SpriteBatch spriteBatch)
inlineprivate

Definition at line 654 of file UIBestiaryTest.cs.

655 {
656 UILinkPointNavigator.Shortcuts.BackButtonCommand = 1;
657 int num = 3000;
658 int currentID = num;
660 SnapPoint snap = null;
661 SnapPoint snap2 = null;
662 SnapPoint snap3 = null;
663 SnapPoint snap4 = null;
664 SnapPoint snap5 = null;
665 SnapPoint snap6 = null;
666 for (int i = 0; i < snapPoints.Count; i++)
667 {
669 switch (snapPoint.Name)
670 {
671 case "BackPage":
672 snap = snapPoint;
673 break;
674 case "NextPage":
676 break;
677 case "ExitButton":
679 break;
680 case "FilterButton":
682 break;
683 case "SortButton":
685 break;
686 case "SearchButton":
688 break;
689 }
690 }
701 uILinkPoint3.Up = uILinkPoint2.ID;
702 UILinkPoint[,] gridPoints = new UILinkPoint[1, 1];
703 int gridWidth;
704 int gridHeight;
705 if (_filteringGrid.Parent != null)
706 {
710 for (int num2 = gridWidth - 1; num2 >= 0; num2--)
711 {
713 if (uILinkPoint6 != null)
714 {
716 }
718 if (uILinkPoint7 != null && uILinkPoint6 == null)
719 {
721 }
723 if (uILinkPoint8 != null)
724 {
725 if (num2 < gridWidth - 3)
726 {
728 }
729 else
730 {
732 }
733 }
734 }
735 }
736 else if (_sortingGrid.Parent != null)
737 {
741 for (int num3 = gridWidth - 1; num3 >= 0; num3--)
742 {
744 if (uILinkPoint9 != null)
745 {
747 }
749 if (uILinkPoint10 != null)
750 {
753 }
754 }
755 }
756 else if (_entryGrid.Parent != null)
757 {
759 for (int j = 0; j < gridWidth; j++)
760 {
761 if (gridHeight - 1 >= 0)
762 {
764 if (uILinkPoint11 != null)
765 {
767 }
768 if (gridHeight - 2 >= 0)
769 {
771 if (uILinkPoint12 != null && uILinkPoint11 == null)
772 {
774 }
775 }
776 }
778 if (uILinkPoint13 != null)
779 {
780 if (j < gridWidth / 2)
781 {
783 }
784 else if (j == gridWidth - 1)
785 {
787 }
788 else
789 {
791 }
792 }
793 }
795 if (uILinkPoint14 != null)
796 {
799 }
800 else
801 {
806 }
807 }
809 for (int k = num; k < currentID; k++)
810 {
812 }
814 {
816 }
817 }
void SetupPointsForSortingGrid(ref int currentID, List< SnapPoint > pts, out int gridWidth, out int gridHeight, out UILinkPoint[,] gridPoints)
void SetupPointsForEntryGrid(ref int currentID, List< SnapPoint > pts, out int gridWidth, out int gridHeight, out UILinkPoint[,] gridPoints)
UIBestiaryFilteringOptionsGrid _filteringGrid
void MoveToVisuallyClosestPoint(List< UILinkPoint > lostrefpoints)
UIBestiarySortingOptionsGrid _sortingGrid
void PairUpDown(UILinkPoint upSide, UILinkPoint downSide)
void PairLeftRight(UILinkPoint leftSide, UILinkPoint rightSide)
UILinkPoint MakeLinkPointFromSnapPoint(int id, SnapPoint snap)
void SetupPointsForFilterGrid(ref int currentID, List< SnapPoint > pts, out int gridWidth, out int gridHeight, out UILinkPoint[,] gridPoints)
static Dictionary< int, UILinkPoint > Points
virtual List< SnapPoint > GetSnapPoints()
Definition UIElement.cs:267

References Terraria.GameContent.UI.States.UIBestiaryTest._entryGrid, Terraria.GameContent.UI.States.UIBestiaryTest._filteringGrid, Terraria.GameContent.UI.States.UIBestiaryTest._sortingGrid, System.Collections.Generic.Dictionary< TKey, TValue >.Count, Terraria.UI.Gamepad.UILinkPointNavigator.CurrentPoint, Terraria.UI.UIElement.GetSnapPoints(), Terraria.GameContent.UI.States.UIBestiaryTest.MakeLinkPointFromSnapPoint(), Terraria.GameContent.UI.States.UIBestiaryTest.MoveToVisuallyClosestPoint(), Terraria.GameContent.UI.States.UIBestiaryTest.PairLeftRight(), Terraria.GameContent.UI.States.UIBestiaryTest.PairUpDown(), Terraria.UI.UIElement.Parent, Terraria.UI.Gamepad.UILinkPointNavigator.Points, Terraria.GameContent.UI.States.UIBestiaryTest.SetupPointsForEntryGrid(), Terraria.GameContent.UI.States.UIBestiaryTest.SetupPointsForFilterGrid(), Terraria.GameContent.UI.States.UIBestiaryTest.SetupPointsForSortingGrid(), and Terraria.GameInput.PlayerInput.UsingGamepadUI.

Referenced by Terraria.GameContent.UI.States.UIBestiaryTest.Draw().