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); }
private void SetupGamepadPoints2(SpriteBatch spriteBatch) { int num = 7; UILinkPointNavigator.Shortcuts.BackButtonCommand = 1; int num2; int iD = num2 = 3001; List <SnapPoint> snapPoints = GetSnapPoints(); RemoveSnapPointsOutOfScreen(spriteBatch, snapPoints); UILinkPointNavigator.SetPosition(iD, _backPanel.GetInnerDimensions().ToRectangle().Center.ToVector2()); UILinkPoint uILinkPoint = UILinkPointNavigator.Points[num2]; uILinkPoint.Unlink(); uILinkPoint.Up = num2 + 1; UILinkPoint uILinkPoint2 = uILinkPoint; num2++; int num3 = 0; List <List <SnapPoint> > list = new List <List <SnapPoint> >(); for (int i = 0; i < num; i++) { List <SnapPoint> emoteGroup = GetEmoteGroup(snapPoints, i); if (emoteGroup.Count > 0) { list.Add(emoteGroup); } num3 += (int)Math.Ceiling((float)emoteGroup.Count / 14f); } SnapPoint[,] array = new SnapPoint[14, num3]; int num4 = 0; for (int j = 0; j < list.Count; j++) { List <SnapPoint> list2 = list[j]; for (int k = 0; k < list2.Count; k++) { int num5 = num4 + k / 14; int num6 = k % 14; array[num6, num5] = list2[k]; } num4 += (int)Math.Ceiling((float)list2.Count / 14f); } int[,] array2 = new int[14, num3]; int up = 0; for (int l = 0; l < array.GetLength(1); l++) { for (int m = 0; m < array.GetLength(0); m++) { SnapPoint snapPoint = array[m, l]; if (snapPoint != null) { UILinkPointNavigator.Points[num2].Unlink(); UILinkPointNavigator.SetPosition(num2, snapPoint.Position); array2[m, l] = num2; if (m == 0) { up = num2; } num2++; } } } uILinkPoint2.Up = up; for (int n = 0; n < array.GetLength(1); n++) { for (int num7 = 0; num7 < array.GetLength(0); num7++) { int num8 = array2[num7, n]; if (num8 == 0) { continue; } UILinkPoint uILinkPoint3 = UILinkPointNavigator.Points[num8]; if (TryGetPointOnGrid(array2, num7, n, -1, 0)) { uILinkPoint3.Left = array2[num7 - 1, n]; } else { uILinkPoint3.Left = uILinkPoint3.ID; for (int num9 = num7; num9 < array.GetLength(0); num9++) { if (TryGetPointOnGrid(array2, num9, n, 0, 0)) { uILinkPoint3.Left = array2[num9, n]; } } } if (TryGetPointOnGrid(array2, num7, n, 1, 0)) { uILinkPoint3.Right = array2[num7 + 1, n]; } else { uILinkPoint3.Right = uILinkPoint3.ID; for (int num10 = num7; num10 >= 0; num10--) { if (TryGetPointOnGrid(array2, num10, n, 0, 0)) { uILinkPoint3.Right = array2[num10, n]; } } } if (TryGetPointOnGrid(array2, num7, n, 0, -1)) { uILinkPoint3.Up = array2[num7, n - 1]; } else { uILinkPoint3.Up = uILinkPoint3.ID; for (int num11 = n - 1; num11 >= 0; num11--) { if (TryGetPointOnGrid(array2, num7, num11, 0, 0)) { uILinkPoint3.Up = array2[num7, num11]; break; } } } if (TryGetPointOnGrid(array2, num7, n, 0, 1)) { uILinkPoint3.Down = array2[num7, n + 1]; continue; } uILinkPoint3.Down = uILinkPoint3.ID; for (int num12 = n + 1; num12 < array.GetLength(1); num12++) { if (TryGetPointOnGrid(array2, num7, num12, 0, 0)) { uILinkPoint3.Down = array2[num7, num12]; break; } } if (uILinkPoint3.Down == uILinkPoint3.ID) { uILinkPoint3.Down = uILinkPoint2.ID; } } } }
private void SetupGamepadPoints(SpriteBatch spriteBatch) { UILinkPointNavigator.Shortcuts.BackButtonCommand = 2; 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; float num = 1f / Main.UIScale; Rectangle clippingRectangle = this._containerPanel.GetClippingRectangle(spriteBatch); Vector2 minimum = clippingRectangle.TopLeft() * num; Vector2 maximum = clippingRectangle.BottomRight() * num; 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._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 ID2 = ID1 + 2; int[] numArray = new int[this._worldList.Count]; for (int index3 = 0; index3 < numArray.Length; ++index3) { numArray[index3] = -1; } for (int index3 = 0; index3 < 5; ++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._worldList.Count != 0 || UILinkPointNavigator.CurrentPoint <= 3001) { return; } UILinkPointNavigator.ChangePoint(3001); }
private void SetupGamepadPoints2(SpriteBatch spriteBatch) { int num1 = 7; UILinkPointNavigator.Shortcuts.BackButtonCommand = 1; int ID1; int index1 = ID1 = 3001; List <SnapPoint> snapPoints = this.GetSnapPoints(); this.RemoveSnapPointsOutOfScreen(spriteBatch, snapPoints); Vector2 vector2 = this._backPanel.GetInnerDimensions().ToRectangle().Center.ToVector2(); UILinkPointNavigator.SetPosition(ID1, vector2); UILinkPoint point1 = UILinkPointNavigator.Points[index1]; point1.Unlink(); point1.Up = index1 + 1; UILinkPoint uiLinkPoint = point1; int ID2 = index1 + 1; int length = 0; List <List <SnapPoint> > snapPointListList = new List <List <SnapPoint> >(); for (int groupIndex = 0; groupIndex < num1; ++groupIndex) { List <SnapPoint> emoteGroup = this.GetEmoteGroup(snapPoints, groupIndex); if (emoteGroup.Count > 0) { snapPointListList.Add(emoteGroup); } length += (int)Math.Ceiling((double)emoteGroup.Count / 14.0); } SnapPoint[,] snapPointArray = new SnapPoint[14, length]; int num2 = 0; for (int index2 = 0; index2 < snapPointListList.Count; ++index2) { List <SnapPoint> snapPointList = snapPointListList[index2]; for (int index3 = 0; index3 < snapPointList.Count; ++index3) { int index4 = num2 + index3 / 14; int index5 = index3 % 14; snapPointArray[index5, index4] = snapPointList[index3]; } num2 += (int)Math.Ceiling((double)snapPointList.Count / 14.0); } int[,] grid = new int[14, length]; int num3 = 0; for (int index2 = 0; index2 < snapPointArray.GetLength(1); ++index2) { for (int index3 = 0; index3 < snapPointArray.GetLength(0); ++index3) { SnapPoint snapPoint = snapPointArray[index3, index2]; if (snapPoint != null) { UILinkPointNavigator.Points[ID2].Unlink(); UILinkPointNavigator.SetPosition(ID2, snapPoint.Position); grid[index3, index2] = ID2; if (index3 == 0) { num3 = ID2; } ++ID2; } } } uiLinkPoint.Up = num3; for (int y1 = 0; y1 < snapPointArray.GetLength(1); ++y1) { for (int x1 = 0; x1 < snapPointArray.GetLength(0); ++x1) { int index2 = grid[x1, y1]; if (index2 != 0) { UILinkPoint point2 = UILinkPointNavigator.Points[index2]; if (this.TryGetPointOnGrid(grid, x1, y1, -1, 0)) { point2.Left = grid[x1 - 1, y1]; } else { point2.Left = point2.ID; for (int x2 = x1; x2 < snapPointArray.GetLength(0); ++x2) { if (this.TryGetPointOnGrid(grid, x2, y1, 0, 0)) { point2.Left = grid[x2, y1]; } } } if (this.TryGetPointOnGrid(grid, x1, y1, 1, 0)) { point2.Right = grid[x1 + 1, y1]; } else { point2.Right = point2.ID; for (int x2 = x1; x2 >= 0; --x2) { if (this.TryGetPointOnGrid(grid, x2, y1, 0, 0)) { point2.Right = grid[x2, y1]; } } } if (this.TryGetPointOnGrid(grid, x1, y1, 0, -1)) { point2.Up = grid[x1, y1 - 1]; } else { point2.Up = point2.ID; for (int y2 = y1 - 1; y2 >= 0; --y2) { if (this.TryGetPointOnGrid(grid, x1, y2, 0, 0)) { point2.Up = grid[x1, y2]; break; } } } if (this.TryGetPointOnGrid(grid, x1, y1, 0, 1)) { point2.Down = grid[x1, y1 + 1]; } else { point2.Down = point2.ID; for (int y2 = y1 + 1; y2 < snapPointArray.GetLength(1); ++y2) { if (this.TryGetPointOnGrid(grid, x1, y2, 0, 0)) { point2.Down = grid[x1, y2]; break; } } if (point2.Down == point2.ID) { point2.Down = uiLinkPoint.ID; } } } } } }
private void SetupGamepadPoints(SpriteBatch spriteBatch) { UILinkPointNavigator.Shortcuts.BackButtonCommand = 1; 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._playerList.Count, 4]; List <SnapPoint> snapPointList1 = snapPoints; // ISSUE: reference to a compiler-generated field if (UICharacterSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegate8 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer UICharacterSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegate8 = new Func <SnapPoint, bool>((object)null, __methodptr(\u003CSetupGamepadPoints\u003Eb__4)); } // ISSUE: reference to a compiler-generated field Func <SnapPoint, bool> anonymousMethodDelegate8 = UICharacterSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegate8; foreach (SnapPoint snapPoint in (IEnumerable <SnapPoint>)Enumerable.Where <SnapPoint>((IEnumerable <M0>)snapPointList1, (Func <M0, bool>)anonymousMethodDelegate8)) { snapPointArray[snapPoint.ID, 0] = snapPoint; } List <SnapPoint> snapPointList2 = snapPoints; // ISSUE: reference to a compiler-generated field if (UICharacterSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegate9 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer UICharacterSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegate9 = new Func <SnapPoint, bool>((object)null, __methodptr(\u003CSetupGamepadPoints\u003Eb__5)); } // ISSUE: reference to a compiler-generated field Func <SnapPoint, bool> anonymousMethodDelegate9 = UICharacterSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegate9; foreach (SnapPoint snapPoint in (IEnumerable <SnapPoint>)Enumerable.Where <SnapPoint>((IEnumerable <M0>)snapPointList2, (Func <M0, bool>)anonymousMethodDelegate9)) { snapPointArray[snapPoint.ID, 1] = snapPoint; } List <SnapPoint> snapPointList3 = snapPoints; // ISSUE: reference to a compiler-generated field if (UICharacterSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegatea == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer UICharacterSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegatea = new Func <SnapPoint, bool>((object)null, __methodptr(\u003CSetupGamepadPoints\u003Eb__6)); } // ISSUE: reference to a compiler-generated field Func <SnapPoint, bool> anonymousMethodDelegatea = UICharacterSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegatea; foreach (SnapPoint snapPoint in (IEnumerable <SnapPoint>)Enumerable.Where <SnapPoint>((IEnumerable <M0>)snapPointList3, (Func <M0, bool>)anonymousMethodDelegatea)) { snapPointArray[snapPoint.ID, 2] = snapPoint; } List <SnapPoint> snapPointList4 = snapPoints; // ISSUE: reference to a compiler-generated field if (UICharacterSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegateb == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer UICharacterSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegateb = new Func <SnapPoint, bool>((object)null, __methodptr(\u003CSetupGamepadPoints\u003Eb__7)); } // ISSUE: reference to a compiler-generated field Func <SnapPoint, bool> anonymousMethodDelegateb = UICharacterSelect.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegateb; foreach (SnapPoint snapPoint in (IEnumerable <SnapPoint>)Enumerable.Where <SnapPoint>((IEnumerable <M0>)snapPointList4, (Func <M0, bool>)anonymousMethodDelegateb)) { snapPointArray[snapPoint.ID, 3] = snapPoint; } int ID3 = index1 + 2; int[] numArray = new int[this._playerList.Count]; for (int index4 = 0; index4 < numArray.Length; ++index4) { numArray[index4] = -1; } for (int index4 = 0; index4 < 4; ++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._playerList.Count != 0 || UILinkPointNavigator.CurrentPoint <= 3001) { return; } UILinkPointNavigator.ChangePoint(3001); }
private void SetupGamepadPoints(SpriteBatch spriteBatch) { UILinkPointNavigator.Shortcuts.BackButtonCommand = 2; 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[_worldList.Count, 5]; 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 == "Seed")) { array[item4.Id, 3] = item4; } foreach (SnapPoint item5 in snapPoints.Where((SnapPoint a) => a.Name == "Delete")) { array[item5.Id, 4] = item5; } num2 = num + 2; int[] array2 = new int[_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 && _worldList.Count == 0 && UILinkPointNavigator.CurrentPoint > 3001) { UILinkPointNavigator.ChangePoint(3001); } }
// Token: 0x060010D8 RID: 4312 RVA: 0x00406828 File Offset: 0x00404A28 private void SetupGamepadPoints(SpriteBatch spriteBatch) { UILinkPointNavigator.Shortcuts.BackButtonCommand = 1; 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._playerList.Count, 4]; 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; Func <SnapPoint, bool> arg_255_1; foreach (SnapPoint current4 in arg_255_0.Where((a) => { return(a.Name == "Delete"); })) { array[current4.ID, 3] = current4; } num2 = num + 2; int[] array2 = new int[this._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 && this._playerList.Count == 0 && UILinkPointNavigator.CurrentPoint > 3001) { UILinkPointNavigator.ChangePoint(3001); } }
private void SetupGamepadPoints(SpriteBatch spriteBatch) { UILinkPointNavigator.Shortcuts.BackButtonCommand = 1; int index1 = 3000; UILinkPointNavigator.SetPosition(3000, this._backPanel.GetInnerDimensions().ToRectangle().Center.ToVector2()); UILinkPointNavigator.SetPosition(3001, this._newPanel.GetInnerDimensions().ToRectangle().Center.ToVector2()); int num = 3000; UILinkPoint point1 = UILinkPointNavigator.Points[3000]; point1.Unlink(); point1.Right = 3001; num = 3001; UILinkPoint point2 = UILinkPointNavigator.Points[3001]; point2.Unlink(); point2.Left = 3000; Rectangle clippingRectangle = this._containerPanel.GetClippingRectangle(spriteBatch); Vector2 minimum = clippingRectangle.TopLeft(); Vector2 maximum = clippingRectangle.BottomRight(); List <SnapPoint> snapPoints = this.GetSnapPoints(); for (int index2 = 0; index2 < snapPoints.Count; ++index2) { if (!snapPoints[index2].Position.Between(minimum, maximum)) { snapPoints.Remove(snapPoints[index2]); --index2; } } 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 ID = index1 + 2; int[] numArray = new int[this._playerList.Count]; for (int index2 = 0; index2 < numArray.Length; ++index2) { numArray[index2] = -1; } for (int index2 = 0; index2 < 4; ++index2) { int index3 = -1; for (int index4 = 0; index4 < snapPointArray.GetLength(0); ++index4) { if (snapPointArray[index4, index2] != null) { UILinkPoint point3 = UILinkPointNavigator.Points[ID]; point3.Unlink(); UILinkPointNavigator.SetPosition(ID, snapPointArray[index4, index2].Position); if (index3 != -1) { point3.Up = index3; UILinkPointNavigator.Points[index3].Down = ID; } if (numArray[index4] != -1) { point3.Left = numArray[index4]; UILinkPointNavigator.Points[numArray[index4]].Right = ID; } point3.Down = index1; if (index2 == 0) { UILinkPointNavigator.Points[index1].Up = UILinkPointNavigator.Points[index1 + 1].Up = ID; } index3 = ID; numArray[index4] = ID; UILinkPointNavigator.Shortcuts.FANCYUI_HIGHEST_INDEX = ID; ++ID; } } } if (!PlayerInput.UsingGamepadUI || this._playerList.Count != 0 || UILinkPointNavigator.CurrentPoint <= 3001) { return; } UILinkPointNavigator.ChangePoint(3001); }