Beispiel #1
0
        public void MoveToVisuallyClosestPoint(int idRangeStartInclusive, int idRangeEndExclusive)
        {
            if (UILinkPointNavigator.CurrentPoint >= idRangeStartInclusive && UILinkPointNavigator.CurrentPoint < idRangeEndExclusive)
            {
                return;
            }
            Dictionary <int, UILinkPoint> points = UILinkPointNavigator.Points;
            Vector2     mouseScreen = Main.MouseScreen;
            UILinkPoint uILinkPoint = null;

            for (int i = idRangeStartInclusive; i < idRangeEndExclusive; i++)
            {
                if (!points.TryGetValue(i, out UILinkPoint value))
                {
                    return;
                }
                if (uILinkPoint == null || Vector2.Distance(mouseScreen, uILinkPoint.Position) > Vector2.Distance(mouseScreen, value.Position))
                {
                    uILinkPoint = value;
                }
            }
            if (uILinkPoint != null)
            {
                UILinkPointNavigator.ChangePoint(uILinkPoint.ID);
            }
        }
Beispiel #2
0
 // Token: 0x06001096 RID: 4246 RVA: 0x00404709 File Offset: 0x00402909
 public override void OnActivate()
 {
     if (PlayerInput.UsingGamepadUI && this._restoreButton != null)
     {
         UILinkPointNavigator.ChangePoint(3002);
     }
 }
Beispiel #3
0
        public void MoveToVisuallyClosestPoint(int idRangeStartInclusive, int idRangeEndExclusive)
        {
            if (UILinkPointNavigator.CurrentPoint >= idRangeStartInclusive && UILinkPointNavigator.CurrentPoint < idRangeEndExclusive)
            {
                return;
            }
            Dictionary <int, UILinkPoint> points = UILinkPointNavigator.Points;
            Vector2     mouseScreen  = Main.MouseScreen;
            UILinkPoint uiLinkPoint1 = (UILinkPoint)null;

            for (int key = idRangeStartInclusive; key < idRangeEndExclusive; ++key)
            {
                UILinkPoint uiLinkPoint2;
                if (!points.TryGetValue(key, out uiLinkPoint2))
                {
                    return;
                }
                if (uiLinkPoint1 == null || (double)Vector2.Distance(mouseScreen, uiLinkPoint1.Position) > (double)Vector2.Distance(mouseScreen, uiLinkPoint2.Position))
                {
                    uiLinkPoint1 = uiLinkPoint2;
                }
            }
            if (uiLinkPoint1 == null)
            {
                return;
            }
            UILinkPointNavigator.ChangePoint(uiLinkPoint1.ID);
        }
        private void SetupGamepadPoints(SpriteBatch spriteBatch)
        {
            UILinkPointNavigator.Shortcuts.BackButtonCommand = 1;
            int num = 3000;
            int idRangeEndExclusive      = num;
            List <SnapPoint> snapPoints  = GetSnapPoints();
            UILinkPoint      uILinkPoint = null;

            for (int i = 0; i < snapPoints.Count; i++)
            {
                SnapPoint snapPoint = snapPoints[i];
                string    name      = snapPoint.Name;
                if (name == "GoBack")
                {
                    uILinkPoint = _helper.MakeLinkPointFromSnapPoint(idRangeEndExclusive++, snapPoint);
                }
            }
            if (PlayerInput.UsingGamepadUI)
            {
                _helper.MoveToVisuallyClosestPoint(num, idRangeEndExclusive);
            }
            if (Main.CreativeMenu.GamepadMoveToSearchButtonHack)
            {
                Main.CreativeMenu.GamepadMoveToSearchButtonHack = false;
                if (uILinkPoint != null)
                {
                    UILinkPointNavigator.ChangePoint(uILinkPoint.ID);
                }
            }
        }
        private void SetupGamepadPoints(SpriteBatch spriteBatch)
        {
            UILinkPointNavigator.Shortcuts.BackButtonCommand = 1;
            int idRangeStartInclusive    = 3000;
            int idRangeEndExclusive      = idRangeStartInclusive;
            List <SnapPoint> snapPoints  = this.GetSnapPoints();
            UILinkPoint      uiLinkPoint = (UILinkPoint)null;

            for (int index = 0; index < snapPoints.Count; ++index)
            {
                SnapPoint snap = snapPoints[index];
                if (snap.Name == "GoBack")
                {
                    uiLinkPoint = this._helper.MakeLinkPointFromSnapPoint(idRangeEndExclusive++, snap);
                }
            }
            if (PlayerInput.UsingGamepadUI)
            {
                this._helper.MoveToVisuallyClosestPoint(idRangeStartInclusive, idRangeEndExclusive);
            }
            if (!Main.CreativeMenu.GamepadMoveToSearchButtonHack)
            {
                return;
            }
            Main.CreativeMenu.GamepadMoveToSearchButtonHack = false;
            if (uiLinkPoint == null)
            {
                return;
            }
            UILinkPointNavigator.ChangePoint(uiLinkPoint.ID);
        }
Beispiel #6
0
 public override void OnActivate()
 {
     if (!PlayerInput.UsingGamepadUI || this._restoreButton == null)
     {
         return;
     }
     UILinkPointNavigator.ChangePoint(3002);
 }
Beispiel #7
0
 public override void OnActivate()
 {
     if (PlayerInput.UsingGamepadUI)
     {
         UILinkPointNavigator.Points[3000].Unlink();
         UILinkPointNavigator.ChangePoint(3000);
     }
 }
Beispiel #8
0
 // Token: 0x060010C9 RID: 4297 RVA: 0x00405B36 File Offset: 0x00403D36
 public override void OnActivate()
 {
     Main.LoadWorlds();
     this.UpdateWorldsList();
     if (PlayerInput.UsingGamepadUI)
     {
         UILinkPointNavigator.ChangePoint(3000 + ((this._worldList.Count == 0) ? 1 : 2));
     }
 }
Beispiel #9
0
 public override void OnActivate()
 {
     Main.LoadPlayers();
     Main.ActivePlayerFileData = new PlayerFileData();
     UpdatePlayersList();
     if (PlayerInput.UsingGamepadUI)
     {
         UILinkPointNavigator.ChangePoint(3000 + ((_playerList.Count == 0) ? 1 : 2));
     }
 }
Beispiel #10
0
 // Token: 0x060010D4 RID: 4308 RVA: 0x004065F9 File Offset: 0x004047F9
 public override void OnActivate()
 {
     Main.ClearPendingPlayerSelectCallbacks();
     Main.LoadPlayers();
     this.UpdatePlayersList();
     if (PlayerInput.UsingGamepadUI)
     {
         UILinkPointNavigator.ChangePoint(3000 + ((this._playerList.Count == 0) ? 1 : 2));
     }
 }
        //public void Resize()
        //      {
        //          float num = this.spacing;
        //          for (int i = 0; i < this.buttonView.children.Count; i++)
        //          {
        //              if (this.buttonView.children[i].Visible)
        //              {
        //                  this.buttonView.children[i].X = num;
        //                  num += this.buttonView.children[i].Width + this.spacing;
        //              }
        //          }
        //          base.Width = num;
        //          this.buttonView.Width = base.Width;
        //      }

        public override void OnActivate()
        {
            if (PlayerInput.UsingGamepadUI)
            {
                UILinkPointNavigator.Points[3000].Unlink();
                UILinkPointNavigator.ChangePoint(3000);
            }

            Main.mapFullscreenScale = .25f;
            drawMap     = typeof(Main).Assembly.GetType("Terraria.Main").GetMethod("DrawMap", BindingFlags.Instance | BindingFlags.NonPublic);
            drawToMap   = typeof(Main).Assembly.GetType("Terraria.Main").GetMethod("DrawToMap", BindingFlags.Instance | BindingFlags.NonPublic);
            genprogress = typeof(GenerationProgress).GetField("_totalProgress", BindingFlags.Instance | BindingFlags.NonPublic);
        }
Beispiel #12
0
        private void MoveToVisuallyClosestPoint(List <UILinkPoint> lostrefpoints)
        {
            _ = UILinkPointNavigator.Points;
            Vector2     mouseScreen = Main.MouseScreen;
            UILinkPoint uILinkPoint = null;

            foreach (UILinkPoint lostrefpoint in lostrefpoints)
            {
                if (uILinkPoint == null || Vector2.Distance(mouseScreen, uILinkPoint.Position) > Vector2.Distance(mouseScreen, lostrefpoint.Position))
                {
                    uILinkPoint = lostrefpoint;
                }
            }
            if (uILinkPoint != null)
            {
                UILinkPointNavigator.ChangePoint(uILinkPoint.ID);
            }
        }
Beispiel #13
0
        public void MoveToVisuallyClosestPoint(List <UILinkPoint> lostrefpoints)
        {
            Dictionary <int, UILinkPoint> points = UILinkPointNavigator.Points;
            Vector2     mouseScreen = Main.MouseScreen;
            UILinkPoint uiLinkPoint = (UILinkPoint)null;

            foreach (UILinkPoint lostrefpoint in lostrefpoints)
            {
                if (uiLinkPoint == null || (double)Vector2.Distance(mouseScreen, uiLinkPoint.Position) > (double)Vector2.Distance(mouseScreen, lostrefpoint.Position))
                {
                    uiLinkPoint = lostrefpoint;
                }
            }
            if (uiLinkPoint == null)
            {
                return;
            }
            UILinkPointNavigator.ChangePoint(uiLinkPoint.ID);
        }
Beispiel #14
0
 // Token: 0x060010C1 RID: 4289 RVA: 0x00406418 File Offset: 0x00404618
 public override void OnActivate()
 {
     this.InitializePage();
     if (Main.gameMenu)
     {
         this._outerContainer.Top.Set(220f, 0f);
         this._outerContainer.Height.Set(-220f, 1f);
     }
     else
     {
         this._outerContainer.Top.Set(120f, 0f);
         this._outerContainer.Height.Set(-120f, 1f);
     }
     this._achievementsList.UpdateOrder();
     if (PlayerInput.UsingGamepadUI)
     {
         UILinkPointNavigator.ChangePoint(3002);
     }
 }
Beispiel #15
0
        private void SetupGamepadPoints(SpriteBatch spriteBatch)
        {
            UILinkPointNavigator.Shortcuts.BackButtonCommand = 1;
            int num = 3000;

            UILinkPointNavigator.SetPosition(num, _backPanel.GetInnerDimensions().ToRectangle().Center.ToVector2());
            UILinkPointNavigator.SetPosition(num + 1, _newPanel.GetInnerDimensions().ToRectangle().Center.ToVector2());
            int         num2        = num;
            UILinkPoint uILinkPoint = UILinkPointNavigator.Points[num2];

            uILinkPoint.Unlink();
            uILinkPoint.Right = num2 + 1;
            num2        = num + 1;
            uILinkPoint = UILinkPointNavigator.Points[num2];
            uILinkPoint.Unlink();
            uILinkPoint.Left = num2 - 1;
            float            scaleFactor       = 1f / Main.UIScale;
            Rectangle        clippingRectangle = _containerPanel.GetClippingRectangle(spriteBatch);
            Vector2          minimum           = clippingRectangle.TopLeft() * scaleFactor;
            Vector2          maximum           = clippingRectangle.BottomRight() * scaleFactor;
            List <SnapPoint> snapPoints        = GetSnapPoints();

            for (int i = 0; i < snapPoints.Count; i++)
            {
                if (!snapPoints[i].Position.Between(minimum, maximum))
                {
                    snapPoints.Remove(snapPoints[i]);
                    i--;
                }
            }
            SnapPoint[,] array = new SnapPoint[_playerList.Count, 4];
            foreach (SnapPoint item in snapPoints.Where((SnapPoint a) => a.Name == "Play"))
            {
                array[item.Id, 0] = item;
            }
            foreach (SnapPoint item2 in snapPoints.Where((SnapPoint a) => a.Name == "Favorite"))
            {
                array[item2.Id, 1] = item2;
            }
            foreach (SnapPoint item3 in snapPoints.Where((SnapPoint a) => a.Name == "Cloud"))
            {
                array[item3.Id, 2] = item3;
            }
            foreach (SnapPoint item4 in snapPoints.Where((SnapPoint a) => a.Name == "Delete"))
            {
                array[item4.Id, 3] = item4;
            }
            num2 = num + 2;
            int[] array2 = new int[_playerList.Count];
            for (int j = 0; j < array2.Length; j++)
            {
                array2[j] = -1;
            }
            for (int k = 0; k < 4; k++)
            {
                int num3 = -1;
                for (int l = 0; l < array.GetLength(0); l++)
                {
                    if (array[l, k] != null)
                    {
                        uILinkPoint = UILinkPointNavigator.Points[num2];
                        uILinkPoint.Unlink();
                        UILinkPointNavigator.SetPosition(num2, array[l, k].Position);
                        if (num3 != -1)
                        {
                            uILinkPoint.Up = num3;
                            UILinkPointNavigator.Points[num3].Down = num2;
                        }
                        if (array2[l] != -1)
                        {
                            uILinkPoint.Left = array2[l];
                            UILinkPointNavigator.Points[array2[l]].Right = num2;
                        }
                        uILinkPoint.Down = num;
                        if (k == 0)
                        {
                            UILinkPointNavigator.Points[num].Up = (UILinkPointNavigator.Points[num + 1].Up = num2);
                        }
                        num3      = num2;
                        array2[l] = num2;
                        UILinkPointNavigator.Shortcuts.FANCYUI_HIGHEST_INDEX = num2;
                        num2++;
                    }
                }
            }
            if (PlayerInput.UsingGamepadUI && _playerList.Count == 0 && UILinkPointNavigator.CurrentPoint > 3001)
            {
                UILinkPointNavigator.ChangePoint(3001);
            }
        }
Beispiel #16
0
        private void SetupGamepadPoints(SpriteBatch spriteBatch)
        {
            UILinkPointNavigator.Shortcuts.BackButtonCommand = 1;
            int ID1 = 3000;

            UILinkPointNavigator.SetPosition(ID1, this._backPanel.GetInnerDimensions().ToRectangle().Center.ToVector2());
            UILinkPointNavigator.SetPosition(ID1 + 1, this._newPanel.GetInnerDimensions().ToRectangle().Center.ToVector2());
            int         index1 = ID1;
            UILinkPoint point1 = UILinkPointNavigator.Points[index1];

            point1.Unlink();
            point1.Right = index1 + 1;
            int         index2 = ID1 + 1;
            UILinkPoint point2 = UILinkPointNavigator.Points[index2];

            point2.Unlink();
            point2.Left = index2 - 1;
            Rectangle        clippingRectangle = this._containerPanel.GetClippingRectangle(spriteBatch);
            Vector2          minimum           = clippingRectangle.TopLeft();
            Vector2          maximum           = clippingRectangle.BottomRight();
            List <SnapPoint> snapPoints        = this.GetSnapPoints();

            for (int index3 = 0; index3 < snapPoints.Count; ++index3)
            {
                if (!snapPoints[index3].Position.Between(minimum, maximum))
                {
                    snapPoints.Remove(snapPoints[index3]);
                    --index3;
                }
            }
            SnapPoint[,] snapPointArray = new SnapPoint[this._playerList.Count, 4];
            foreach (SnapPoint snapPoint in snapPoints.Where <SnapPoint>((Func <SnapPoint, bool>)(a => a.Name == "Play")))
            {
                snapPointArray[snapPoint.ID, 0] = snapPoint;
            }
            foreach (SnapPoint snapPoint in snapPoints.Where <SnapPoint>((Func <SnapPoint, bool>)(a => a.Name == "Favorite")))
            {
                snapPointArray[snapPoint.ID, 1] = snapPoint;
            }
            foreach (SnapPoint snapPoint in snapPoints.Where <SnapPoint>((Func <SnapPoint, bool>)(a => a.Name == "Cloud")))
            {
                snapPointArray[snapPoint.ID, 2] = snapPoint;
            }
            foreach (SnapPoint snapPoint in snapPoints.Where <SnapPoint>((Func <SnapPoint, bool>)(a => a.Name == "Delete")))
            {
                snapPointArray[snapPoint.ID, 3] = snapPoint;
            }
            int ID2 = ID1 + 2;

            int[] numArray = new int[this._playerList.Count];
            for (int index3 = 0; index3 < numArray.Length; ++index3)
            {
                numArray[index3] = -1;
            }
            for (int index3 = 0; index3 < 4; ++index3)
            {
                int index4 = -1;
                for (int index5 = 0; index5 < snapPointArray.GetLength(0); ++index5)
                {
                    if (snapPointArray[index5, index3] != null)
                    {
                        UILinkPoint point3 = UILinkPointNavigator.Points[ID2];
                        point3.Unlink();
                        UILinkPointNavigator.SetPosition(ID2, snapPointArray[index5, index3].Position);
                        if (index4 != -1)
                        {
                            point3.Up = index4;
                            UILinkPointNavigator.Points[index4].Down = ID2;
                        }
                        if (numArray[index5] != -1)
                        {
                            point3.Left = numArray[index5];
                            UILinkPointNavigator.Points[numArray[index5]].Right = ID2;
                        }
                        point3.Down = ID1;
                        if (index3 == 0)
                        {
                            UILinkPointNavigator.Points[ID1].Up = UILinkPointNavigator.Points[ID1 + 1].Up = ID2;
                        }
                        index4           = ID2;
                        numArray[index5] = ID2;
                        UILinkPointNavigator.Shortcuts.FANCYUI_HIGHEST_INDEX = ID2;
                        ++ID2;
                    }
                }
            }
            if (!PlayerInput.UsingGamepadUI || this._playerList.Count != 0 || UILinkPointNavigator.CurrentPoint <= 3001)
            {
                return;
            }
            UILinkPointNavigator.ChangePoint(3001);
        }
Beispiel #17
0
        private void SetupGamepadPoints(SpriteBatch spriteBatch)
        {
            int currentID = 10000;
            List <SnapPoint> snapPoints = GetSnapPoints();
            List <SnapPoint> orderedPointsByCategoryName  = _helper.GetOrderedPointsByCategoryName(snapPoints, "strip 0");
            List <SnapPoint> orderedPointsByCategoryName2 = _helper.GetOrderedPointsByCategoryName(snapPoints, "strip 1");
            List <SnapPoint> orderedPointsByCategoryName3 = _helper.GetOrderedPointsByCategoryName(snapPoints, "strip 2");

            UILinkPoint[] array  = null;
            UILinkPoint[] array2 = null;
            UILinkPoint[] array3 = null;
            if (orderedPointsByCategoryName.Count > 0)
            {
                array = _helper.CreateUILinkStripVertical(ref currentID, orderedPointsByCategoryName);
            }
            if (orderedPointsByCategoryName2.Count > 0)
            {
                array2 = _helper.CreateUILinkStripVertical(ref currentID, orderedPointsByCategoryName2);
            }
            if (orderedPointsByCategoryName3.Count > 0)
            {
                array3 = _helper.CreateUILinkStripVertical(ref currentID, orderedPointsByCategoryName3);
            }
            if (array != null && array2 != null)
            {
                _helper.LinkVerticalStrips(array, array2, (array.Length - array2.Length) / 2);
            }
            if (array2 != null && array3 != null)
            {
                _helper.LinkVerticalStrips(array2, array3, (array.Length - array2.Length) / 2);
            }
            UILinkPoint uILinkPoint  = null;
            UILinkPoint uILinkPoint2 = null;
            UILinkPoint uILinkPoint3 = null;

            for (int i = 0; i < snapPoints.Count; i++)
            {
                SnapPoint snapPoint = snapPoints[i];
                string    name      = snapPoint.Name;
                if (!(name == "CreativeSacrificeConfirm"))
                {
                    if (name == "CreativeInfinitesSearch")
                    {
                        uILinkPoint3 = _helper.MakeLinkPointFromSnapPoint(currentID++, snapPoint);
                        Main.CreativeMenu.GamepadPointIdForInfiniteItemSearchHack = uILinkPoint3.ID;
                    }
                }
                else
                {
                    uILinkPoint2 = _helper.MakeLinkPointFromSnapPoint(currentID++, snapPoint);
                }
            }
            uILinkPoint = UILinkPointNavigator.Points[15000];
            List <SnapPoint> orderedPointsByCategoryName4 = _helper.GetOrderedPointsByCategoryName(snapPoints, "CreativeInfinitesFilter");

            UILinkPoint[] array4 = null;
            if (orderedPointsByCategoryName4.Count > 0)
            {
                array4 = _helper.CreateUILinkStripHorizontal(ref currentID, orderedPointsByCategoryName4);
                if (uILinkPoint3 != null)
                {
                    uILinkPoint3.Up = array4[0].ID;
                    for (int j = 0; j < array4.Length; j++)
                    {
                        array4[j].Down = uILinkPoint3.ID;
                    }
                }
            }
            List <SnapPoint> orderedPointsByCategoryName5 = _helper.GetOrderedPointsByCategoryName(snapPoints, "CreativeInfinitesSlot");

            UILinkPoint[,] array5 = null;
            if (orderedPointsByCategoryName5.Count > 0)
            {
                array5 = _helper.CreateUILinkPointGrid(ref currentID, orderedPointsByCategoryName5, _infiniteItemsWindow.GetItemsPerLine(), uILinkPoint3, array[0]);
                _helper.LinkVerticalStripRightSideToSingle(array, array5[0, 0]);
            }
            else if (uILinkPoint3 != null)
            {
                _helper.LinkVerticalStripRightSideToSingle(array, uILinkPoint3);
            }
            if (uILinkPoint3 != null && array5 != null)
            {
                _helper.PairUpDown(uILinkPoint3, array5[0, 0]);
            }
            if (uILinkPoint != null && IsShowingResearchMenu)
            {
                _helper.LinkVerticalStripRightSideToSingle(array, uILinkPoint);
            }
            if (uILinkPoint2 != null)
            {
                _helper.PairUpDown(uILinkPoint, uILinkPoint2);
                uILinkPoint2.Left = array[0].ID;
            }
            if (Main.CreativeMenu.GamepadMoveToSearchButtonHack)
            {
                Main.CreativeMenu.GamepadMoveToSearchButtonHack = false;
                if (uILinkPoint3 != null)
                {
                    UILinkPointNavigator.ChangePoint(uILinkPoint3.ID);
                }
            }
        }
Beispiel #18
0
        private void SetupGamepadPoints(SpriteBatch spriteBatch)
        {
            UILinkPointNavigator.Shortcuts.BackButtonCommand = 2;
            int       index1     = 3000;
            int       ID1        = index1;
            Rectangle rectangle1 = this._backPanel.GetInnerDimensions().ToRectangle();
            // ISSUE: explicit reference operation
            Vector2 vector2_1 = ((Rectangle)@rectangle1).get_Center().ToVector2();

            UILinkPointNavigator.SetPosition(ID1, vector2_1);
            int       ID2        = index1 + 1;
            Rectangle rectangle2 = this._newPanel.GetInnerDimensions().ToRectangle();
            // ISSUE: explicit reference operation
            Vector2 vector2_2 = ((Rectangle)@rectangle2).get_Center().ToVector2();

            UILinkPointNavigator.SetPosition(ID2, vector2_2);
            int         index2 = index1;
            UILinkPoint point1 = UILinkPointNavigator.Points[index2];

            point1.Unlink();
            point1.Right = index2 + 1;
            int         index3 = index1 + 1;
            UILinkPoint point2 = UILinkPointNavigator.Points[index3];

            point2.Unlink();
            point2.Left = index3 - 1;
            Rectangle        clippingRectangle = this._containerPanel.GetClippingRectangle(spriteBatch);
            Vector2          minimum           = clippingRectangle.TopLeft();
            Vector2          maximum           = clippingRectangle.BottomRight();
            List <SnapPoint> snapPoints        = this.GetSnapPoints();

            for (int index4 = 0; index4 < snapPoints.Count; ++index4)
            {
                if (!snapPoints[index4].Position.Between(minimum, maximum))
                {
                    snapPoints.Remove(snapPoints[index4]);
                    --index4;
                }
            }
            SnapPoint[,] snapPointArray = new SnapPoint[this._worldList.Count, 5];
            List <SnapPoint> snapPointList1 = snapPoints;

            // ISSUE: reference to a compiler-generated field
            if (UIWorldSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegate9 == null)
            {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: method pointer
                UIWorldSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegate9 = new Func <SnapPoint, bool>((object)null, __methodptr(\u003CSetupGamepadPoints\u003Eb__4));
            }
            // ISSUE: reference to a compiler-generated field
            Func <SnapPoint, bool> anonymousMethodDelegate9 = UIWorldSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegate9;

            foreach (SnapPoint snapPoint in (IEnumerable <SnapPoint>)Enumerable.Where <SnapPoint>((IEnumerable <M0>)snapPointList1, (Func <M0, bool>)anonymousMethodDelegate9))
            {
                snapPointArray[snapPoint.ID, 0] = snapPoint;
            }
            List <SnapPoint> snapPointList2 = snapPoints;

            // ISSUE: reference to a compiler-generated field
            if (UIWorldSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegatea == null)
            {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: method pointer
                UIWorldSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegatea = new Func <SnapPoint, bool>((object)null, __methodptr(\u003CSetupGamepadPoints\u003Eb__5));
            }
            // ISSUE: reference to a compiler-generated field
            Func <SnapPoint, bool> anonymousMethodDelegatea = UIWorldSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegatea;

            foreach (SnapPoint snapPoint in (IEnumerable <SnapPoint>)Enumerable.Where <SnapPoint>((IEnumerable <M0>)snapPointList2, (Func <M0, bool>)anonymousMethodDelegatea))
            {
                snapPointArray[snapPoint.ID, 1] = snapPoint;
            }
            List <SnapPoint> snapPointList3 = snapPoints;

            // ISSUE: reference to a compiler-generated field
            if (UIWorldSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegateb == null)
            {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: method pointer
                UIWorldSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegateb = new Func <SnapPoint, bool>((object)null, __methodptr(\u003CSetupGamepadPoints\u003Eb__6));
            }
            // ISSUE: reference to a compiler-generated field
            Func <SnapPoint, bool> anonymousMethodDelegateb = UIWorldSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegateb;

            foreach (SnapPoint snapPoint in (IEnumerable <SnapPoint>)Enumerable.Where <SnapPoint>((IEnumerable <M0>)snapPointList3, (Func <M0, bool>)anonymousMethodDelegateb))
            {
                snapPointArray[snapPoint.ID, 2] = snapPoint;
            }
            List <SnapPoint> snapPointList4 = snapPoints;

            // ISSUE: reference to a compiler-generated field
            if (UIWorldSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegatec == null)
            {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: method pointer
                UIWorldSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegatec = new Func <SnapPoint, bool>((object)null, __methodptr(\u003CSetupGamepadPoints\u003Eb__7));
            }
            // ISSUE: reference to a compiler-generated field
            Func <SnapPoint, bool> anonymousMethodDelegatec = UIWorldSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegatec;

            foreach (SnapPoint snapPoint in (IEnumerable <SnapPoint>)Enumerable.Where <SnapPoint>((IEnumerable <M0>)snapPointList4, (Func <M0, bool>)anonymousMethodDelegatec))
            {
                snapPointArray[snapPoint.ID, 3] = snapPoint;
            }
            List <SnapPoint> snapPointList5 = snapPoints;

            // ISSUE: reference to a compiler-generated field
            if (UIWorldSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegated == null)
            {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: method pointer
                UIWorldSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegated = new Func <SnapPoint, bool>((object)null, __methodptr(\u003CSetupGamepadPoints\u003Eb__8));
            }
            // ISSUE: reference to a compiler-generated field
            Func <SnapPoint, bool> anonymousMethodDelegated = UIWorldSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegated;

            foreach (SnapPoint snapPoint in (IEnumerable <SnapPoint>)Enumerable.Where <SnapPoint>((IEnumerable <M0>)snapPointList5, (Func <M0, bool>)anonymousMethodDelegated))
            {
                snapPointArray[snapPoint.ID, 4] = snapPoint;
            }
            int ID3 = index1 + 2;

            int[] numArray = new int[this._worldList.Count];
            for (int index4 = 0; index4 < numArray.Length; ++index4)
            {
                numArray[index4] = -1;
            }
            for (int index4 = 0; index4 < 5; ++index4)
            {
                int index5 = -1;
                for (int index6 = 0; index6 < snapPointArray.GetLength(0); ++index6)
                {
                    if (snapPointArray[index6, index4] != null)
                    {
                        UILinkPoint point3 = UILinkPointNavigator.Points[ID3];
                        point3.Unlink();
                        UILinkPointNavigator.SetPosition(ID3, snapPointArray[index6, index4].Position);
                        if (index5 != -1)
                        {
                            point3.Up = index5;
                            UILinkPointNavigator.Points[index5].Down = ID3;
                        }
                        if (numArray[index6] != -1)
                        {
                            point3.Left = numArray[index6];
                            UILinkPointNavigator.Points[numArray[index6]].Right = ID3;
                        }
                        point3.Down = index1;
                        if (index4 == 0)
                        {
                            UILinkPointNavigator.Points[index1].Up = UILinkPointNavigator.Points[index1 + 1].Up = ID3;
                        }
                        index5           = ID3;
                        numArray[index6] = ID3;
                        UILinkPointNavigator.Shortcuts.FANCYUI_HIGHEST_INDEX = ID3;
                        ++ID3;
                    }
                }
            }
            if (!PlayerInput.UsingGamepadUI || this._worldList.Count != 0 || UILinkPointNavigator.CurrentPoint <= 3001)
            {
                return;
            }
            UILinkPointNavigator.ChangePoint(3001);
        }
Beispiel #19
0
        private void SetupGamepadPoints(SpriteBatch spriteBatch)
        {
            int currentID = 10000;
            List <SnapPoint> snapPoints            = this.GetSnapPoints();
            List <SnapPoint> pointsByCategoryName1 = this._helper.GetOrderedPointsByCategoryName(snapPoints, "strip 0");
            List <SnapPoint> pointsByCategoryName2 = this._helper.GetOrderedPointsByCategoryName(snapPoints, "strip 1");
            List <SnapPoint> pointsByCategoryName3 = this._helper.GetOrderedPointsByCategoryName(snapPoints, "strip 2");

            UILinkPoint[] uiLinkPointArray1 = (UILinkPoint[])null;
            UILinkPoint[] uiLinkPointArray2 = (UILinkPoint[])null;
            UILinkPoint[] stripOnRight      = (UILinkPoint[])null;
            if (pointsByCategoryName1.Count > 0)
            {
                uiLinkPointArray1 = this._helper.CreateUILinkStripVertical(ref currentID, pointsByCategoryName1);
            }
            if (pointsByCategoryName2.Count > 0)
            {
                uiLinkPointArray2 = this._helper.CreateUILinkStripVertical(ref currentID, pointsByCategoryName2);
            }
            if (pointsByCategoryName3.Count > 0)
            {
                stripOnRight = this._helper.CreateUILinkStripVertical(ref currentID, pointsByCategoryName3);
            }
            if (uiLinkPointArray1 != null && uiLinkPointArray2 != null)
            {
                this._helper.LinkVerticalStrips(uiLinkPointArray1, uiLinkPointArray2, (uiLinkPointArray1.Length - uiLinkPointArray2.Length) / 2);
            }
            if (uiLinkPointArray2 != null && stripOnRight != null)
            {
                this._helper.LinkVerticalStrips(uiLinkPointArray2, stripOnRight, (uiLinkPointArray1.Length - uiLinkPointArray2.Length) / 2);
            }
            UILinkPoint downSide    = (UILinkPoint)null;
            UILinkPoint uiLinkPoint = (UILinkPoint)null;

            for (int index = 0; index < snapPoints.Count; ++index)
            {
                SnapPoint snap = snapPoints[index];
                string    name = snap.Name;
                if (!(name == "CreativeSacrificeConfirm"))
                {
                    if (name == "CreativeInfinitesSearch")
                    {
                        uiLinkPoint = this._helper.MakeLinkPointFromSnapPoint(currentID++, snap);
                        Main.CreativeMenu.GamepadPointIdForInfiniteItemSearchHack = uiLinkPoint.ID;
                    }
                }
                else
                {
                    downSide = this._helper.MakeLinkPointFromSnapPoint(currentID++, snap);
                }
            }
            UILinkPoint      point = UILinkPointNavigator.Points[15000];
            List <SnapPoint> pointsByCategoryName4 = this._helper.GetOrderedPointsByCategoryName(snapPoints, "CreativeInfinitesFilter");

            if (pointsByCategoryName4.Count > 0)
            {
                UILinkPoint[] linkStripHorizontal = this._helper.CreateUILinkStripHorizontal(ref currentID, pointsByCategoryName4);
                if (uiLinkPoint != null)
                {
                    uiLinkPoint.Up = linkStripHorizontal[0].ID;
                    for (int index = 0; index < linkStripHorizontal.Length; ++index)
                    {
                        linkStripHorizontal[index].Down = uiLinkPoint.ID;
                    }
                }
            }
            List <SnapPoint> pointsByCategoryName5 = this._helper.GetOrderedPointsByCategoryName(snapPoints, "CreativeInfinitesSlot");

            UILinkPoint[,] uiLinkPointArray3 = (UILinkPoint[, ])null;
            if (pointsByCategoryName5.Count > 0)
            {
                uiLinkPointArray3 = this._helper.CreateUILinkPointGrid(ref currentID, pointsByCategoryName5, this._infiniteItemsWindow.GetItemsPerLine(), uiLinkPoint, uiLinkPointArray1[0]);
                this._helper.LinkVerticalStripRightSideToSingle(uiLinkPointArray1, uiLinkPointArray3[0, 0]);
            }
            else if (uiLinkPoint != null)
            {
                this._helper.LinkVerticalStripRightSideToSingle(uiLinkPointArray1, uiLinkPoint);
            }
            if (uiLinkPoint != null && uiLinkPointArray3 != null)
            {
                this._helper.PairUpDown(uiLinkPoint, uiLinkPointArray3[0, 0]);
            }
            if (point != null && this.IsShowingResearchMenu)
            {
                this._helper.LinkVerticalStripRightSideToSingle(uiLinkPointArray1, point);
            }
            if (downSide != null)
            {
                this._helper.PairUpDown(point, downSide);
                downSide.Left = uiLinkPointArray1[0].ID;
            }
            if (!Main.CreativeMenu.GamepadMoveToSearchButtonHack)
            {
                return;
            }
            Main.CreativeMenu.GamepadMoveToSearchButtonHack = false;
            if (uiLinkPoint == null)
            {
                return;
            }
            UILinkPointNavigator.ChangePoint(uiLinkPoint.ID);
        }
Beispiel #20
0
        // Token: 0x060010CD RID: 4301 RVA: 0x00405D60 File Offset: 0x00403F60
        private void SetupGamepadPoints(SpriteBatch spriteBatch)
        {
            UILinkPointNavigator.Shortcuts.BackButtonCommand = 2;
            int num = 3000;

            UILinkPointNavigator.SetPosition(num, this._backPanel.GetInnerDimensions().ToRectangle().Center.ToVector2());
            UILinkPointNavigator.SetPosition(num + 1, this._newPanel.GetInnerDimensions().ToRectangle().Center.ToVector2());
            int         num2        = num;
            UILinkPoint uILinkPoint = UILinkPointNavigator.Points[num2];

            uILinkPoint.Unlink();
            uILinkPoint.Right = num2 + 1;
            num2        = num + 1;
            uILinkPoint = UILinkPointNavigator.Points[num2];
            uILinkPoint.Unlink();
            uILinkPoint.Left = num2 - 1;
            Rectangle        expr_A6    = this._containerPanel.GetClippingRectangle(spriteBatch);
            Vector2          minimum    = expr_A6.TopLeft();
            Vector2          maximum    = expr_A6.BottomRight();
            List <SnapPoint> snapPoints = this.GetSnapPoints();

            for (int i = 0; i < snapPoints.Count; i++)
            {
                if (!snapPoints[i].Position.Between(minimum, maximum))
                {
                    snapPoints.Remove(snapPoints[i]);
                    i--;
                }
            }
            SnapPoint[,] array = new SnapPoint[this._worldList.Count, 5];
            IEnumerable <SnapPoint> arg_135_0 = snapPoints;

            foreach (SnapPoint current in arg_135_0.Where((a) => { return(a.Name == "Play"); }))
            {
                array[current.ID, 0] = current;
            }
            IEnumerable <SnapPoint> arg_195_0 = snapPoints;

            foreach (SnapPoint current2 in arg_195_0.Where((a) => { return(a.Name == "Favorite"); }))
            {
                array[current2.ID, 1] = current2;
            }
            IEnumerable <SnapPoint> arg_1F5_0 = snapPoints;

            foreach (SnapPoint current3 in arg_1F5_0.Where((a) => { return(a.Name == "Cloud"); }))
            {
                array[current3.ID, 2] = current3;
            }
            IEnumerable <SnapPoint> arg_255_0 = snapPoints;

            foreach (SnapPoint current4 in arg_255_0.Where((a) => { return(a.Name == "Seed"); }))
            {
                array[current4.ID, 3] = current4;
            }
            IEnumerable <SnapPoint> arg_2B5_0 = snapPoints;

            foreach (SnapPoint current5 in arg_2B5_0.Where((a) => { return(a.Name == "Delete"); }))
            {
                array[current5.ID, 4] = current5;
            }
            num2 = num + 2;
            int[] array2 = new int[this._worldList.Count];
            for (int j = 0; j < array2.Length; j++)
            {
                array2[j] = -1;
            }
            for (int k = 0; k < 5; k++)
            {
                int num3 = -1;
                for (int l = 0; l < array.GetLength(0); l++)
                {
                    if (array[l, k] != null)
                    {
                        uILinkPoint = UILinkPointNavigator.Points[num2];
                        uILinkPoint.Unlink();
                        UILinkPointNavigator.SetPosition(num2, array[l, k].Position);
                        if (num3 != -1)
                        {
                            uILinkPoint.Up = num3;
                            UILinkPointNavigator.Points[num3].Down = num2;
                        }
                        if (array2[l] != -1)
                        {
                            uILinkPoint.Left = array2[l];
                            UILinkPointNavigator.Points[array2[l]].Right = num2;
                        }
                        uILinkPoint.Down = num;
                        if (k == 0)
                        {
                            UILinkPointNavigator.Points[num].Up = (UILinkPointNavigator.Points[num + 1].Up = num2);
                        }
                        num3      = num2;
                        array2[l] = num2;
                        UILinkPointNavigator.Shortcuts.FANCYUI_HIGHEST_INDEX = num2;
                        num2++;
                    }
                }
            }
            if (PlayerInput.UsingGamepadUI && this._worldList.Count == 0 && UILinkPointNavigator.CurrentPoint > 3001)
            {
                UILinkPointNavigator.ChangePoint(3001);
            }
        }
Beispiel #21
0
        private void SetupGamepadPoints(SpriteBatch spriteBatch)
        {
            UILinkPointNavigator.Shortcuts.BackButtonCommand = 1;
            int idRangeStartInclusive    = 3000;
            int currentID                = idRangeStartInclusive;
            List <SnapPoint> snapPoints1 = this.GetSnapPoints();
            List <SnapPoint> snapPoints2 = this._availablePacksList.GetSnapPoints();

            this._helper.CullPointsOutOfElementArea(spriteBatch, snapPoints2, (UIElement)this._availablePacksList);
            List <SnapPoint> snapPoints3 = this._enabledPacksList.GetSnapPoints();

            this._helper.CullPointsOutOfElementArea(spriteBatch, snapPoints3, (UIElement)this._enabledPacksList);
            UILinkPoint[] fromCategoryName1 = this._helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints2, "ToggleToOn");
            UILinkPoint[] fromCategoryName2 = this._helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints2, "InfoOff");
            UILinkPoint[] fromCategoryName3 = this._helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints3, "ToggleToOff");
            UILinkPoint[] fromCategoryName4 = this._helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints3, "InfoOn");
            UILinkPoint[] fromCategoryName5 = this._helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints3, "OrderUp");
            UILinkPoint[] fromCategoryName6 = this._helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints3, "OrderDown");
            UILinkPoint   uiLinkPoint1      = (UILinkPoint)null;
            UILinkPoint   uiLinkPoint2      = (UILinkPoint)null;

            for (int index = 0; index < snapPoints1.Count; ++index)
            {
                SnapPoint snap = snapPoints1[index];
                string    name = snap.Name;
                if (!(name == "GoBack"))
                {
                    if (name == "OpenFolder")
                    {
                        uiLinkPoint2 = this._helper.MakeLinkPointFromSnapPoint(currentID++, snap);
                    }
                }
                else
                {
                    uiLinkPoint1 = this._helper.MakeLinkPointFromSnapPoint(currentID++, snap);
                }
            }
            this._helper.LinkVerticalStrips(fromCategoryName2, fromCategoryName1, 0);
            this._helper.LinkVerticalStrips(fromCategoryName1, fromCategoryName3, 0);
            this._helper.LinkVerticalStrips(fromCategoryName3, fromCategoryName4, 0);
            this._helper.LinkVerticalStrips(fromCategoryName4, fromCategoryName5, 0);
            this._helper.LinkVerticalStrips(fromCategoryName5, fromCategoryName6, 0);
            this._helper.LinkVerticalStripBottomSideToSingle(fromCategoryName1, uiLinkPoint1);
            this._helper.LinkVerticalStripBottomSideToSingle(fromCategoryName2, uiLinkPoint1);
            this._helper.LinkVerticalStripBottomSideToSingle(fromCategoryName5, uiLinkPoint2);
            this._helper.LinkVerticalStripBottomSideToSingle(fromCategoryName6, uiLinkPoint2);
            this._helper.LinkVerticalStripBottomSideToSingle(fromCategoryName3, uiLinkPoint2);
            this._helper.LinkVerticalStripBottomSideToSingle(fromCategoryName4, uiLinkPoint2);
            this._helper.PairLeftRight(uiLinkPoint1, uiLinkPoint2);
            if (PlayerInput.UsingGamepadUI)
            {
                this._helper.MoveToVisuallyClosestPoint(idRangeStartInclusive, currentID);
            }
            if (!Main.CreativeMenu.GamepadMoveToSearchButtonHack)
            {
                return;
            }
            Main.CreativeMenu.GamepadMoveToSearchButtonHack = false;
            if (uiLinkPoint1 == null)
            {
                return;
            }
            UILinkPointNavigator.ChangePoint(uiLinkPoint1.ID);
        }
Beispiel #22
0
        private void SetupGamepadPoints(SpriteBatch spriteBatch)
        {
            UILinkPointNavigator.Shortcuts.BackButtonCommand = 2;
            int       index1     = 3000;
            int       ID1        = index1;
            Rectangle rectangle1 = this._backPanel.GetInnerDimensions().ToRectangle();
            // ISSUE: explicit reference operation
            Vector2 vector2_1 = ((Rectangle)@rectangle1).get_Center().ToVector2();

            UILinkPointNavigator.SetPosition(ID1, vector2_1);
            int       ID2        = index1 + 1;
            Rectangle rectangle2 = this._newPanel.GetInnerDimensions().ToRectangle();
            // ISSUE: explicit reference operation
            Vector2 vector2_2 = ((Rectangle)@rectangle2).get_Center().ToVector2();

            UILinkPointNavigator.SetPosition(ID2, vector2_2);
            int         index2 = index1;
            UILinkPoint point1 = UILinkPointNavigator.Points[index2];

            point1.Unlink();
            point1.Right = index2 + 1;
            int         index3 = index1 + 1;
            UILinkPoint point2 = UILinkPointNavigator.Points[index3];

            point2.Unlink();
            point2.Left = index3 - 1;
            Rectangle        clippingRectangle = this._containerPanel.GetClippingRectangle(spriteBatch);
            Vector2          minimum           = clippingRectangle.TopLeft();
            Vector2          maximum           = clippingRectangle.BottomRight();
            List <SnapPoint> snapPoints        = this.GetSnapPoints();

            for (int index4 = 0; index4 < snapPoints.Count; ++index4)
            {
                if (!snapPoints[index4].Position.Between(minimum, maximum))
                {
                    snapPoints.Remove(snapPoints[index4]);
                    --index4;
                }
            }
            SnapPoint[,] snapPointArray = new SnapPoint[this._worldList.Count, 5];
            foreach (SnapPoint snapPoint in snapPoints.Where <SnapPoint>((Func <SnapPoint, bool>)(a => a.Name == "Play")))
            {
                snapPointArray[snapPoint.ID, 0] = snapPoint;
            }
            foreach (SnapPoint snapPoint in snapPoints.Where <SnapPoint>((Func <SnapPoint, bool>)(a => a.Name == "Favorite")))
            {
                snapPointArray[snapPoint.ID, 1] = snapPoint;
            }
            foreach (SnapPoint snapPoint in snapPoints.Where <SnapPoint>((Func <SnapPoint, bool>)(a => a.Name == "Cloud")))
            {
                snapPointArray[snapPoint.ID, 2] = snapPoint;
            }
            foreach (SnapPoint snapPoint in snapPoints.Where <SnapPoint>((Func <SnapPoint, bool>)(a => a.Name == "Seed")))
            {
                snapPointArray[snapPoint.ID, 3] = snapPoint;
            }
            foreach (SnapPoint snapPoint in snapPoints.Where <SnapPoint>((Func <SnapPoint, bool>)(a => a.Name == "Delete")))
            {
                snapPointArray[snapPoint.ID, 4] = snapPoint;
            }
            int ID3 = index1 + 2;

            int[] numArray = new int[this._worldList.Count];
            for (int index4 = 0; index4 < numArray.Length; ++index4)
            {
                numArray[index4] = -1;
            }
            for (int index4 = 0; index4 < 5; ++index4)
            {
                int index5 = -1;
                for (int index6 = 0; index6 < snapPointArray.GetLength(0); ++index6)
                {
                    if (snapPointArray[index6, index4] != null)
                    {
                        UILinkPoint point3 = UILinkPointNavigator.Points[ID3];
                        point3.Unlink();
                        UILinkPointNavigator.SetPosition(ID3, snapPointArray[index6, index4].Position);
                        if (index5 != -1)
                        {
                            point3.Up = index5;
                            UILinkPointNavigator.Points[index5].Down = ID3;
                        }
                        if (numArray[index6] != -1)
                        {
                            point3.Left = numArray[index6];
                            UILinkPointNavigator.Points[numArray[index6]].Right = ID3;
                        }
                        point3.Down = index1;
                        if (index4 == 0)
                        {
                            UILinkPointNavigator.Points[index1].Up = UILinkPointNavigator.Points[index1 + 1].Up = ID3;
                        }
                        index5           = ID3;
                        numArray[index6] = ID3;
                        UILinkPointNavigator.Shortcuts.FANCYUI_HIGHEST_INDEX = ID3;
                        ++ID3;
                    }
                }
            }
            if (!PlayerInput.UsingGamepadUI || this._worldList.Count != 0 || UILinkPointNavigator.CurrentPoint <= 3001)
            {
                return;
            }
            UILinkPointNavigator.ChangePoint(3001);
        }
Beispiel #23
0
        private void SetupGamepadPoints(SpriteBatch spriteBatch)
        {
            UILinkPointNavigator.Shortcuts.BackButtonCommand = 1;
            int num       = 3000;
            int currentID = num;
            List <SnapPoint> snapPoints  = GetSnapPoints();
            List <SnapPoint> snapPoints2 = _availablePacksList.GetSnapPoints();

            _helper.CullPointsOutOfElementArea(spriteBatch, snapPoints2, _availablePacksList);
            List <SnapPoint> snapPoints3 = _enabledPacksList.GetSnapPoints();

            _helper.CullPointsOutOfElementArea(spriteBatch, snapPoints3, _enabledPacksList);
            UILinkPoint[] verticalStripFromCategoryName  = _helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints2, "ToggleToOn");
            UILinkPoint[] verticalStripFromCategoryName2 = _helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints2, "InfoOff");
            UILinkPoint[] verticalStripFromCategoryName3 = _helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints3, "ToggleToOff");
            UILinkPoint[] verticalStripFromCategoryName4 = _helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints3, "InfoOn");
            UILinkPoint[] verticalStripFromCategoryName5 = _helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints3, "OrderUp");
            UILinkPoint[] verticalStripFromCategoryName6 = _helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints3, "OrderDown");
            UILinkPoint   uILinkPoint  = null;
            UILinkPoint   uILinkPoint2 = null;

            for (int i = 0; i < snapPoints.Count; i++)
            {
                SnapPoint snapPoint = snapPoints[i];
                string    name      = snapPoint.Name;
                if (!(name == "GoBack"))
                {
                    if (name == "OpenFolder")
                    {
                        uILinkPoint2 = _helper.MakeLinkPointFromSnapPoint(currentID++, snapPoint);
                    }
                }
                else
                {
                    uILinkPoint = _helper.MakeLinkPointFromSnapPoint(currentID++, snapPoint);
                }
            }
            _helper.LinkVerticalStrips(verticalStripFromCategoryName2, verticalStripFromCategoryName, 0);
            _helper.LinkVerticalStrips(verticalStripFromCategoryName, verticalStripFromCategoryName3, 0);
            _helper.LinkVerticalStrips(verticalStripFromCategoryName3, verticalStripFromCategoryName4, 0);
            _helper.LinkVerticalStrips(verticalStripFromCategoryName4, verticalStripFromCategoryName5, 0);
            _helper.LinkVerticalStrips(verticalStripFromCategoryName5, verticalStripFromCategoryName6, 0);
            _helper.LinkVerticalStripBottomSideToSingle(verticalStripFromCategoryName, uILinkPoint);
            _helper.LinkVerticalStripBottomSideToSingle(verticalStripFromCategoryName2, uILinkPoint);
            _helper.LinkVerticalStripBottomSideToSingle(verticalStripFromCategoryName5, uILinkPoint2);
            _helper.LinkVerticalStripBottomSideToSingle(verticalStripFromCategoryName6, uILinkPoint2);
            _helper.LinkVerticalStripBottomSideToSingle(verticalStripFromCategoryName3, uILinkPoint2);
            _helper.LinkVerticalStripBottomSideToSingle(verticalStripFromCategoryName4, uILinkPoint2);
            _helper.PairLeftRight(uILinkPoint, uILinkPoint2);
            if (PlayerInput.UsingGamepadUI)
            {
                _helper.MoveToVisuallyClosestPoint(num, currentID);
            }
            if (Main.CreativeMenu.GamepadMoveToSearchButtonHack)
            {
                Main.CreativeMenu.GamepadMoveToSearchButtonHack = false;
                if (uILinkPoint != null)
                {
                    UILinkPointNavigator.ChangePoint(uILinkPoint.ID);
                }
            }
        }