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

◆ LinkVerticalStrips()

void Terraria.GameContent.UI.States.UIGamepadHelper.LinkVerticalStrips ( UILinkPoint[] stripOnLeft,
UILinkPoint[] stripOnRight,
int leftStripStartOffset )
inline

Definition at line 72 of file UIGamepadHelper.cs.

73 {
74 if (stripOnLeft == null || stripOnRight == null)
75 {
76 return;
77 }
78 int num = Math.Max(stripOnLeft.Length, stripOnRight.Length);
79 int num2 = Math.Min(stripOnLeft.Length, stripOnRight.Length);
80 for (int i = 0; i < leftStripStartOffset; i++)
81 {
83 }
84 for (int j = 0; j < num2; j++)
85 {
87 }
88 for (int k = num2; k < num; k++)
89 {
90 if (stripOnLeft.Length > k)
91 {
92 stripOnLeft[k].Right = stripOnRight[stripOnRight.Length - 1].ID;
93 }
94 if (stripOnRight.Length > k)
95 {
96 stripOnRight[k].Left = stripOnLeft[stripOnLeft.Length - 1].ID;
97 }
98 }
99 }
static byte Min(byte val1, byte val2)
Definition Math.cs:912
static byte Max(byte val1, byte val2)
Definition Math.cs:738
void PairLeftRight(UILinkPoint leftSide, UILinkPoint rightSide)

References System.Math.Max(), System.Math.Min(), and Terraria.GameContent.UI.States.UIGamepadHelper.PairLeftRight().

Referenced by Terraria.GameContent.UI.States.UICreativePowersMenu.SetupGamepadPoints(), and Terraria.GameContent.UI.States.UIResourcePackSelectionMenu.SetupGamepadPoints().