public override void ProcessKeys() { base.ProcessKeys(); if (KClass.Key_Z && LastZ == 0) { MenuItemList[MenuSelectIndex].Click(); OnChangeMenu = TimeMain + 1; } if (!KClass.Key_X && !KClass.Key_ESC || LastX != 0) { return; } OnRemoveMenu = TimeMain + 20; TransparentVelocity = -15f; foreach (BaseMenuItem menuItem in MenuItemList) { BaseMenuItem baseMenuItem = menuItem; PointF originalPosition = MenuItemList[0].OriginalPosition; double x = originalPosition.X; originalPosition = MenuItemList[0].OriginalPosition; double y = originalPosition.Y; PointF pointF = new PointF((float)x, (float)y); baseMenuItem.DestPoint = pointF; menuItem.OnRemove = true; } StageData.SoundPlay("se_cancel00.wav"); }
public override void ProcessKeys2() { if (this.KClass.Key_Z && this.LastZ == 0) { this.MenuItemList[this.MenuSelectIndex].Click(); this.OnChangeMenu = this.TimeMain + 1; } if (!this.KClass.Key_X && !this.KClass.Key_ESC || this.LastX != 0) { return; } this.OnRemoveMenu = this.TimeMain + 20; this.TransparentVelocity = -15f; foreach (BaseMenuItem menuItem in this.MenuItemList) { BaseMenuItem baseMenuItem = menuItem; PointF originalPosition = this.MenuItemList[0].OriginalPosition; double x = (double)originalPosition.X; originalPosition = this.MenuItemList[0].OriginalPosition; double y = (double)originalPosition.Y; PointF pointF = new PointF((float)x, (float)y); baseMenuItem.DestPoint = pointF; menuItem.OnRemove = true; } this.StageData.SoundPlay("se_cancel00.wav"); }
public MenuGroup_Pause(StageDataPackage StageData) : base(StageData) { this.MenuSelectIndex = 0; this.MenuItemList = new List <BaseMenuItem>(); this.MenuItemList.Add(new BaseMenuItem(StageData, "Menu_继续游戏")); if (!StageData.GlobalData.LastState.StageData.OnReplay && StageData.GlobalData.LastState.StageData.ContinueTimes == 0) { this.MenuItemList.Add(new BaseMenuItem(StageData, "Menu_保存录像")); } this.MenuItemList.Add(new BaseMenuItem(StageData, "Menu_返回主菜单")); this.MenuItemList.Add(new BaseMenuItem(StageData, "Menu_从头开始")); int num1 = 62; int num2 = 300; int num3 = -200; foreach (BaseMenuItem menuItem in this.MenuItemList) { menuItem.DestPoint = new PointF((float)num1, (float)num2); menuItem.Position = new PointF((float)(num1 + num3), 150f); num2 += 30; num3 -= 50; } this.MenuTitlePos2 = new PointF(-50f, 240f); this.MenuTitlePos1 = new PointF(44f, 240f); BaseMenuItem baseMenuItem = new BaseMenuItem(StageData, "Menu_游戏暂停"); baseMenuItem.Position = this.MenuTitlePos2; this.MenuTilte = baseMenuItem; this.MenuItemList[this.MenuSelectIndex].Selected = true; }
public MenuGroup_SCPractice(StageDataPackage StageData) : base(StageData) { MenuSelectIndex = 0; MenuItemList = new List <BaseMenuItem>(); List <SpellCardHistory> all = StageData.PData.SC_History.FindAll((a => a.MyPlaneFullName == "ReimuA")); for (int index = 0; index < all.Count; ++index) { List <BaseMenuItem> menuItemList = MenuItemList; SCMenuItem scMenuItem1 = new SCMenuItem(StageData, all[index].Index.ToString().PadRight(3)) { Description = (all[index].Rank.ToString().PadLeft(10) + all[index].Recorded.ToString().PadLeft(2) + "/" + all[index].History.ToString().PadLeft(2)).PadLeft(40), TxtureObject = StageData.TextureObjectDictionary["欧" + all[index].Name], DefaultColor = all[index].Recorded > 0 ? Color.SkyBlue : Color.White }; SCMenuItem scMenuItem2 = scMenuItem1; menuItemList.Add(scMenuItem2); } int num1 = 100; int num2 = 100; foreach (BaseMenuItem menuItem in MenuItemList) { menuItem.TransparentValueF = 0.0f; menuItem.Position = new PointF(num1, 90f); menuItem.DestPoint = new PointF(num1, num2); menuItem.MaxVelocity = 10000f; num2 += deltaY; } MenuItemList[MenuSelectIndex].Selected = true; MenuTitlePos1 = new PointF(140f, -30f); MenuTitlePos2 = new PointF(140f, -150f); BaseMenuItem baseMenuItem = new BaseMenuItem(StageData, "MenuTitle_MusicRoom") { Position = MenuTitlePos2 }; MenuTilte = baseMenuItem; TransparentValueF = 0.0f; TransparentVelocity = 5f; TxtureObject = TextureObjectDictionary["MenuBackground"]; Scale = 0.625f; Rectangle boundRect = BoundRect; double num3 = (boundRect.Width / 2); boundRect = BoundRect; double num4 = (boundRect.Height / 2); OriginalPosition = new PointF((float)num3, (float)num4); AngleDegree = 90.0; ColorValue = Color.SlateBlue; DescriptionBox descriptionBox = new DescriptionBox(StageData) { MaxTransparent = 0, OffsetX = 50 }; DescriptionBox = descriptionBox; }
public MenuGroup_RankSelect(StageDataPackage StageData, bool StageSelect) : base(StageData) { this.StageSelect = StageSelect; MenuSelectIndex = 1; MenuItemList = new List <BaseMenuItem>() { new BaseMenuItem(StageData, "Menu_Easy"), new BaseMenuItem(StageData, "Menu_Normal"), new BaseMenuItem(StageData, "Menu_Hard"), new BaseMenuItem(StageData, "Menu_Lunatic") }; int num1 = 220 + MenuSelectIndex * 150; int num2 = 200 - MenuSelectIndex * 100; int num3 = -200; int num4 = 0; foreach (BaseMenuItem menuItem in MenuItemList) { menuItem.Position = new PointF((num1 + num3), 48f); menuItem.DestPoint = new PointF(num1, num2); menuItem.Scale = 0.8f; menuItem.Vibrateable = false; menuItem.MaxVelocity = 30f; num2 += 100; num1 -= 150; num3 -= 100; ++num4; } MenuItemList[MenuSelectIndex].Selected = true; MenuTitlePos1 = new PointF(0.0f, 0.0f); MenuTitlePos2 = new PointF(0.0f, -150f); BaseMenuItem baseMenuItem = new BaseMenuItem(StageData, "MenuTitle_RankSelect") { Position = MenuTitlePos2 }; MenuTilte = baseMenuItem; TransparentValueF = 0.0f; TransparentVelocity = 20f; TxtureObject = TextureObjectDictionary["MenuBackground"]; double num5 = (BoundRect.Width / 2); Rectangle boundRect = BoundRect; double num6 = (boundRect.Height / 2); OriginalPosition = new PointF((float)num5, (float)num6); AngleDegree = 90.0; Scale = 0.625f; MaxScale = 0.75f; ScaleVelocity = 0.005f; boundRect = BoundRect; double num7 = (boundRect.Width / 2 + 30 * (MenuSelectIndex - 1)); boundRect = BoundRect; double num8 = (boundRect.Height / 2 - 20 * (MenuSelectIndex - 1)); DestPoint = new PointF((float)num7, (float)num8); Velocity = 4f; AngleWithDirection = false; }
public MenuGroup_MusicRoom(StageDataPackage StageData) : base(StageData) { MenuSelectIndex = 0; MenuItemList = new List <BaseMenuItem>() { new BaseMenuItem(StageData, "被遗忘的久远星辉"), new BaseMenuItem(StageData, "宁静夏夜的微风"), new BaseMenuItem(StageData, "喧闹吧!在这不眠之夜"), new BaseMenuItem(StageData, "灯火竹林"), new BaseMenuItem(StageData, "疾风闪电"), new BaseMenuItem(StageData, "木灵们的夏夜祭"), new BaseMenuItem(StageData, "青柳传说"), new BaseMenuItem(StageData, "万花世界的光与影"), new BaseMenuItem(StageData, "镜中的幻象"), new BaseMenuItem(StageData, "记忆中遥远的星星"), new BaseMenuItem(StageData, "引燃夜空的星火"), new BaseMenuItem(StageData, "银河的彼方"), new BaseMenuItem(StageData, "?????"), new BaseMenuItem(StageData, "闪耀在世界尽头"), new BaseMenuItem(StageData, "晚星之梦"), new BaseMenuItem(StageData, "璀璨无比的星空"), new BaseMenuItem(StageData, "来自仙界的新风"), new BaseMenuItem(StageData, "风中花,雪中月") }; int num1 = 100; int num2 = 100; foreach (BaseMenuItem menuItem in MenuItemList) { menuItem.Position = new PointF(num1, 90f); menuItem.DestPoint = new PointF(num1, num2); menuItem.MaxVelocity = 100f; num2 += 30; } MenuItemList[MenuSelectIndex].Selected = true; MenuTitlePos1 = new PointF(140f, -30f); MenuTitlePos2 = new PointF(140f, -150f); BaseMenuItem baseMenuItem = new BaseMenuItem(StageData, "MenuTitle_MusicRoom") { Position = MenuTitlePos2 }; MenuTilte = baseMenuItem; TransparentValueF = 0.0f; TransparentVelocity = 5f; TxtureObject = TextureObjectDictionary["MenuBackground"]; Scale = 0.625f; OriginalPosition = new PointF(BoundRect.Width / 2, BoundRect.Height / 2); AngleDegree = 90.0; ColorValue = Color.SlateBlue; DescriptionBox descriptionBox = new DescriptionBox(StageData) { MaxTransparent = 0, OffsetX = 50 }; DescriptionBox = descriptionBox; }
public MenuGroup_WeaponSelect(StageDataPackage StageData, bool StageSelect, int PlaneType) : base(StageData) { this.StageSelect = StageSelect; this.MenuSelectIndex = 0; if (PlaneType == 1) { this.MenuItemList = new List <BaseMenuItem>(); List <BaseMenuItem> menuItemList1 = this.MenuItemList; CharacterMenuItem characterMenuItem1 = new CharacterMenuItem(StageData, "Weapon_PlaneA"); characterMenuItem1.Scale = 0.7f; characterMenuItem1.DestPoint1 = new PointF(270f, 150f); characterMenuItem1.DestPoint2 = new PointF(200f, 150f); characterMenuItem1.TransparentValueF = 0.0f; CharacterMenuItem characterMenuItem2 = characterMenuItem1; menuItemList1.Add((BaseMenuItem)characterMenuItem2); List <BaseMenuItem> menuItemList2 = this.MenuItemList; CharacterMenuItem characterMenuItem3 = new CharacterMenuItem(StageData, "Weapon_PlaneB"); characterMenuItem3.Scale = 0.7f; characterMenuItem3.DestPoint1 = new PointF(270f, 150f); characterMenuItem3.DestPoint2 = new PointF(340f, 150f); characterMenuItem3.TransparentValueF = 0.0f; CharacterMenuItem characterMenuItem4 = characterMenuItem3; menuItemList2.Add((BaseMenuItem)characterMenuItem4); } else { List <BaseMenuItem> baseMenuItemList1 = new List <BaseMenuItem>(); List <BaseMenuItem> baseMenuItemList2 = baseMenuItemList1; CharacterMenuItem characterMenuItem1 = new CharacterMenuItem(StageData, "Weapon_AyaA"); characterMenuItem1.Scale = 0.7f; characterMenuItem1.DestPoint1 = new PointF(270f, 150f); characterMenuItem1.DestPoint2 = new PointF(200f, 150f); characterMenuItem1.TransparentValueF = 0.0f; CharacterMenuItem characterMenuItem2 = characterMenuItem1; baseMenuItemList2.Add((BaseMenuItem)characterMenuItem2); this.MenuItemList = baseMenuItemList1; } this.MenuItemList[this.MenuSelectIndex].Selected = true; this.MenuTitlePos1 = new PointF(280f, 30f); this.MenuTitlePos2 = new PointF(280f, -100f); BaseMenuItem baseMenuItem = new BaseMenuItem(StageData, "MenuTitle_WeaponSelect"); baseMenuItem.Position = this.MenuTitlePos2; this.MenuTilte = baseMenuItem; this.TransparentValueF = 0.0f; this.MaxTransparent = (int)byte.MaxValue; this.TransparentVelocity = 5f; this.OriginalPosition = new PointF((float)(this.BoundRect.Width / 2), (float)(this.BoundRect.Height / 2)); this.AngleDegree = 90.0; }
public override void ProcessZ() { if (this.MenuSelectIndex == this.MenuItemList.Count - 1) { ReplayInfo repInfo = this.StageData.GlobalData.LastState.StageData.RepInfo; repInfo.PlayerName = (string)null; for (int index = 0; index < 7; ++index) { repInfo.PlayerName += this.PlayerName[index]; } this.StageData.Rep.SaveRpy(".\\Replay\\thSSS_" + this.RepMenuItem.Name + ".rpy", repInfo); this.RepMenuItem.Description = ((DescriptionMenuItem)this.MenuTilte).Description; this.OnRemoveMenu = this.TimeMain + 20; this.TransparentVelocity = -15f; foreach (BaseMenuItem menuItem in this.MenuItemList) { BaseMenuItem baseMenuItem = menuItem; PointF originalPosition = this.MenuItemList[0].OriginalPosition; double x = (double)originalPosition.X; originalPosition = this.MenuItemList[0].OriginalPosition; double y = (double)originalPosition.Y; PointF pointF = new PointF((float)x, (float)y); baseMenuItem.DestPoint = pointF; menuItem.OnRemove = true; } this.StageData.SoundPlay("se_extend.wav"); } else if (this.MenuSelectIndex == this.MenuItemList.Count - 2) { if (this.NameIndex > 0) { --this.NameIndex; this.PlayerName[this.NameIndex] = (string)null; } this.StageData.SoundPlay("se_cancel00.wav"); } else { this.PlayerName[this.NameIndex] = this.MenuItemList[this.MenuSelectIndex].Name; this.StageData.SoundPlay("se_ok00.wav"); if (this.NameIndex < 7) { ++this.NameIndex; } } this.ShowPlayerName(); }
public MenuGroup_StageSelect(StageDataPackage StageData) : base(StageData) { this.MenuSelectIndex = 0; this.MenuItemList = new List <BaseMenuItem>(); this.MenuItemList.Add(new BaseMenuItem(StageData, "Stage01")); this.MenuItemList.Add(new BaseMenuItem(StageData, "Boss01")); int practiceLevel = 1; StageData.PData.C_History.ForEach((Action <ClearHistory>)(a => { if (a.Rank != StageData.StateSwitchData.SDPswitch.Difficulty || !(a.MyPlaneFullName == StageData.StateSwitchData.SDPswitch.MyPlane.FullName)) { return; } practiceLevel = a.PracticeLevel; })); if (practiceLevel > 1) { this.MenuItemList.Add(new BaseMenuItem(StageData, "Stage02")); this.MenuItemList.Add(new BaseMenuItem(StageData, "Boss02")); } if (practiceLevel > 2) { this.MenuItemList.Add(new BaseMenuItem(StageData, "Stage03")); this.MenuItemList.Add(new BaseMenuItem(StageData, "Boss03")); } if (practiceLevel > 3) { this.MenuItemList.Add(new BaseMenuItem(StageData, "Stage04")); this.MenuItemList.Add(new BaseMenuItem(StageData, "Boss04")); } if (practiceLevel > 4) { this.MenuItemList.Add(new BaseMenuItem(StageData, "Stage05")); this.MenuItemList.Add(new BaseMenuItem(StageData, "Boss05")); } if (practiceLevel > 5) { this.MenuItemList.Add(new BaseMenuItem(StageData, "Stage06")); this.MenuItemList.Add(new BaseMenuItem(StageData, "Boss06")); } int num1 = 440; int num2 = 120; int num3 = 0; int num4 = 0; foreach (BaseMenuItem menuItem in this.MenuItemList) { menuItem.Position = new PointF((float)(num1 + num3), 120f); if (num4 % 2 == 0) { menuItem.DestPoint = new PointF((float)num1, (float)num2); } else { menuItem.DestPoint = new PointF((float)(num1 + 80), (float)num2); num2 += 32; } ++num4; } this.MenuItemList[this.MenuSelectIndex].Selected = true; BaseMenuItem baseMenuItem = new BaseMenuItem(StageData, "MenuTitle_StageSelect"); baseMenuItem.Position = this.MenuTitlePos2; this.MenuTilte = baseMenuItem; this.TransparentValueF = 0.0f; this.MaxTransparent = 210; this.TransparentVelocity = 10f; this.AngleDegree = 90.0; this.Scale = 0.75f; this.OriginalPosition = new PointF((float)(this.BoundRect.Width / 2 + 30 * (int)(StageData.StateSwitchData.SDPswitch.Difficulty - 1)), (float)(this.BoundRect.Height / 2 - 20 * (int)(StageData.StateSwitchData.SDPswitch.Difficulty - 1))); }
public MenuGroup_PlayerSelect(StageDataPackage StageData, bool StageSelect) : base(StageData) { this.StageSelect = StageSelect; MenuSelectIndex = 0; MenuItemList = new List <BaseMenuItem>(); PlayerDescription = new List <BaseMenuItem>(); List <BaseMenuItem> menuItemList1 = MenuItemList; CharacterMenuItem characterMenuItem1 = new CharacterMenuItem(StageData, "FaceReimu_me") { DestPoint1 = new PointF(sbyte.MinValue, 10f), DestPoint2 = new PointF(-228f, 10f), TransparentValueF = 0.0f }; CharacterMenuItem characterMenuItem2 = characterMenuItem1; menuItemList1.Add(characterMenuItem2); List <BaseMenuItem> playerDescription1 = PlayerDescription; CharacterMenuItem characterMenuItem3 = new CharacterMenuItem(StageData, "DescriptionReimu") { DestPoint1 = new PointF(190f, 10f), DestPoint2 = new PointF(260f, 10f), TransparentValueF = 0.0f }; CharacterMenuItem characterMenuItem4 = characterMenuItem3; playerDescription1.Add(characterMenuItem4); List <BaseMenuItem> menuItemList2 = MenuItemList; CharacterMenuItem characterMenuItem5 = new CharacterMenuItem(StageData, "FaceMarisa_me") { DestPoint1 = new PointF(sbyte.MinValue, 10f), DestPoint2 = new PointF(-228f, 10f), TransparentValueF = 0.0f }; CharacterMenuItem characterMenuItem6 = characterMenuItem5; menuItemList2.Add(characterMenuItem6); List <BaseMenuItem> playerDescription2 = PlayerDescription; CharacterMenuItem characterMenuItem7 = new CharacterMenuItem(StageData, "DescriptionMarisa") { DestPoint1 = new PointF(190f, 10f), DestPoint2 = new PointF(260f, 10f), TransparentValueF = 0.0f }; CharacterMenuItem characterMenuItem8 = characterMenuItem7; playerDescription2.Add(characterMenuItem8); List <BaseMenuItem> menuItemList3 = MenuItemList; CharacterMenuItem characterMenuItem9 = new CharacterMenuItem(StageData, "FaceSanae_me") { DestPoint1 = new PointF(0.0f, 30f), DestPoint2 = new PointF(-100f, 30f), TransparentValueF = 0.0f }; CharacterMenuItem characterMenuItem10 = characterMenuItem9; menuItemList3.Add(characterMenuItem10); List <BaseMenuItem> playerDescription3 = PlayerDescription; CharacterMenuItem characterMenuItem11 = new CharacterMenuItem(StageData, "DescriptionSanae") { DestPoint1 = new PointF(190f, 10f), DestPoint2 = new PointF(260f, 10f), TransparentValueF = 0.0f }; CharacterMenuItem characterMenuItem12 = characterMenuItem11; playerDescription3.Add(characterMenuItem12); List <BaseMenuItem> menuItemList4 = MenuItemList; CharacterMenuItem characterMenuItem13 = new CharacterMenuItem(StageData, "FaceKoishi_me") { DestPoint1 = new PointF(sbyte.MinValue, 10f), DestPoint2 = new PointF(-228f, 10f), TransparentValueF = 0.0f }; CharacterMenuItem characterMenuItem14 = characterMenuItem13; menuItemList4.Add(characterMenuItem14); List <BaseMenuItem> playerDescription4 = PlayerDescription; CharacterMenuItem characterMenuItem15 = new CharacterMenuItem(StageData, "DescriptionKoishi") { DestPoint1 = new PointF(190f, 10f), DestPoint2 = new PointF(260f, 10f), TransparentValueF = 0.0f }; CharacterMenuItem characterMenuItem16 = characterMenuItem15; playerDescription4.Add(characterMenuItem16); MenuItemList[MenuSelectIndex].Selected = true; PlayerDescription[MenuSelectIndex].Selected = true; BaseMenuItem baseMenuItem = new BaseMenuItem(StageData, "MenuTitle_PlayerSelect") { Position = MenuTitlePos2 }; MenuTilte = baseMenuItem; TransparentValueF = 0.0f; MaxTransparent = byte.MaxValue; TransparentVelocity = 10f; TxtureObject = TextureObjectDictionary["MenuBackground"]; AngleDegree = 90.0; Scale = 0.75f; Rectangle boundRect = BoundRect; double num1 = (boundRect.Width / 2 + 30 * (int)(StageData.StateSwitchData.SDPswitch.Difficulty - 1)); boundRect = BoundRect; double num2 = (boundRect.Height / 2 - 20 * (int)(StageData.StateSwitchData.SDPswitch.Difficulty - 1)); OriginalPosition = new PointF((float)num1, (float)num2); }
public override void ProcessKeys() { base.ProcessKeys(); if (KClass.Key_Z && LastZ == 0) { switch (MenuItemList[MenuSelectIndex].Name) { case "Menu_Quit": OnRemoveMenu = TimeMain + 20; TransparentVelocity = -15f; using (List <BaseMenuItem> .Enumerator enumerator = MenuItemList.GetEnumerator()) { while (enumerator.MoveNext()) { BaseMenuItem current = enumerator.Current; current.DestPoint = new PointF(60f, 160f); current.OnRemove = true; } goto case "Menu_BGM_Vol"; } case "Menu_BGM_Vol": case "Menu_SE_Vol": StageData.SoundPlay("se_ok00.wav"); break; default: StageData.StateSwitchData = new StateSwitchDataPackage() { NextState = "此功能尚未开通", NeedInit = true, SDPswitch = StageData }; goto case "Menu_BGM_Vol"; } } if ((KClass.Key_X || KClass.Key_ESC) && LastX == 0) { MenuSelectIndex = MenuItemList.Count - 1; SelectItemChanged(); StageData.SoundPlay("se_cancel00.wav"); } if (KClass.ArrowRight && (LastRight == 0 || LastRight > 30)) { switch (MenuItemList[MenuSelectIndex].Name) { case "Menu_BGM_Vol": BGM_Player.Volume += 5; BGMvolumn.Num = BGM_Player.Volume; break; case "Menu_SE_Vol": foreach (XAudio2_Player xaudio2Player in StageData.SoundDictionary.Values) { xaudio2Player.Volume += 5; SEvolumn.Num = xaudio2Player.Volume; } StageData.SoundPlay("se_ok00.wav"); break; } LastSelectTime = TimeMain; StageData.GlobalData.BGMVolume = BGM_Player.Volume; StageData.GlobalData.SEVolume = SEvolumn.Num; } if (!KClass.ArrowLeft || LastLeft != 0 && LastLeft <= 30) { return; } switch (MenuItemList[MenuSelectIndex].Name) { case "Menu_BGM_Vol": BGM_Player.Volume -= 5; BGMvolumn.Num = BGM_Player.Volume; break; case "Menu_SE_Vol": foreach (XAudio2_Player xaudio2Player in StageData.SoundDictionary.Values) { xaudio2Player.Volume -= 5; SEvolumn.Num = xaudio2Player.Volume; } StageData.SoundPlay("se_ok00.wav"); break; } LastSelectTime = TimeMain; StageData.GlobalData.BGMVolume = BGM_Player.Volume; StageData.GlobalData.SEVolume = SEvolumn.Num; }
public MenuGroup_ReplayNamer( StageDataPackage StageData, PointF OriginalPosition, DescriptionMenuItem RepMenuItem) : base(StageData) { this.RepMenuItem = RepMenuItem; this.MenuItemList = new List <BaseMenuItem>(); StageDataPackage stageData = StageData.GlobalData.LastState.StageData; string[,] strArray = new string[7, 13] { { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M" }, { "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }, { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m" }, { "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" }, { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "-", "=" }, { ".", ",", "!", "?", "@", ":", ";", "[", "]", "(", ")", "_", "/" }, { "{", "}", "|", "~", "^", "#", "$", "%", "&", "*", " ", "BS", "OK" } }; for (int index1 = 0; index1 < 7; ++index1) { for (int index2 = 0; index2 < 13; ++index2) { BaseMenuItem baseMenuItem = (BaseMenuItem) new DescriptionMenuItem(StageData, strArray[index1, index2]); baseMenuItem.OriginalPosition = new PointF((float)(stageData.BoundRect.Left + stageData.BoundRect.Width / 2 - 138), 300f); baseMenuItem.DestPoint = new PointF((float)(stageData.BoundRect.Left + stageData.BoundRect.Width / 2 - 138 + index2 * 22), (float)(270 + index1 * 22)); this.MenuItemList.Add(baseMenuItem); } } this.MenuSelectIndex = this.MenuItemList.Count - 1; ReplayInfo repInfo = StageData.GlobalData.LastState.StageData.RepInfo; this.RepDescription += DateTime.Now.Date.ToString("yy'/'MM'/'dd").PadRight(9); this.RepDescription += repInfo.MyPlaneName.PadRight(7); switch (repInfo.Rank) { case DifficultLevel.Easy: this.RepDescription += "E "; break; case DifficultLevel.Normal: this.RepDescription += "N "; break; case DifficultLevel.Hard: this.RepDescription += "H "; break; case DifficultLevel.Lunatic: this.RepDescription += "L "; break; case DifficultLevel.Ultra: this.RepDescription += "U "; break; case DifficultLevel.Extra: this.RepDescription += "EX "; break; } this.RepDescription += repInfo.LastStage == null ? " " : repInfo.LastStage.PadRight(4); this.MenuItemList[this.MenuSelectIndex].Selected = true; DescriptionMenuItem descriptionMenuItem = new DescriptionMenuItem(StageData, RepMenuItem.Name); descriptionMenuItem.Description = " " + this.RepDescription; descriptionMenuItem.OriginalPosition = RepMenuItem.OriginalPosition; descriptionMenuItem.Selected = true; this.MenuTilte = (BaseMenuItem)descriptionMenuItem; this.MenuTitlePos1 = new PointF(OriginalPosition.X, OriginalPosition.Y); this.MenuTitlePos2 = RepMenuItem.OriginalPosition; for (char[] charArray = stageData.PData.PlayerName.ToCharArray(); this.NameIndex < charArray.Length; ++this.NameIndex) { this.PlayerName[this.NameIndex] = charArray[this.NameIndex].ToString(); } this.ShowPlayerName(); }
public override void UpdateData() { if (TimeMain == 50) { BaseEffect baseEffect = new BaseEffect(StageData, "woshixingtu", new PointF(385f, 240f), 4f, 0.0); baseEffect.AngleDegree = 90.0; baseEffect.Active = false; baseEffect.DestPoint = new PointF(320f, 240f); baseEffect.AngleWithDirection = false; baseEffect.Scale = 1f; baseEffect.TransparentValueF = 0.0f; baseEffect.TransparentVelocity = 5f; } else if (TimeMain == 100) { BaseEffect baseEffect = new BaseEffect(StageData, "woshibiaotihebaisi", new PointF(385f, 240f), 4f, 0.0); baseEffect.AngleDegree = 90.0; baseEffect.Active = false; baseEffect.DestPoint = new PointF(320f, 240f); baseEffect.AngleWithDirection = false; baseEffect.Scale = 1f; baseEffect.TransparentValueF = 0.0f; baseEffect.TransparentVelocity = 5f; EmitterTitleStarFall emitterTitleStarFall = new EmitterTitleStarFall(StageData); StageData.MenuGroupList.Add(new MenuGroup_Main(StageData)); } else if (TimeMain == 130) { SelectBox selectBox = new SelectBox(StageData); selectBox.Velocity = 100f; selectBox.OriginalPosition = new PointF(0.0f, 500f); SelectFrame = selectBox; } if (StageData.MenuGroupList.Count > 0) { BaseMenuItem menuItem1 = StageData.MenuGroupList[StageData.MenuGroupList.Count - 1].MenuItemList[StageData.MenuGroupList[StageData.MenuGroupList.Count - 1].MenuSelectIndex]; PointF pointF1; if (StageData.MenuGroupList.Count == 1 || StageData.MenuGroupList[StageData.MenuGroupList.Count - 1] is MenuOption) { StageDataPackage stageData = StageData; MyRandom ran = Ran; pointF1 = menuItem1.OriginalPosition; int minValue = (int)pointF1.X - 10; pointF1 = menuItem1.OriginalPosition; int maxValue = (int)pointF1.X + menuItem1.TxtureObject.PosRect.Width + 10; double num1 = ran.Next(minValue, maxValue); pointF1 = menuItem1.OriginalPosition; double num2 = pointF1.Y + 20.0; PointF Position = new PointF((float)num1, (float)num2); double num3 = StageData.Ran.Next(10, 20) / 10; double Direction = -1.0 * Math.PI / 2.0 - StageData.Ran.Next(1, 5) / 10.0; Particle particle = new Particle(stageData, "Star", Position, (float)num3, Direction); particle.Active = true; particle.Scale = StageData.Ran.Next(15, 40) / 100f; particle.LifeTime = 20; } if (SelectFrame != null) { BaseMenuItem menuItem2 = StageData.MenuGroupList[0].MenuItemList[StageData.MenuGroupList[0].MenuSelectIndex]; pointF1 = SelectFrame.DestPoint; double y1 = pointF1.Y; pointF1 = menuItem2.OriginalPosition; double y2 = pointF1.Y; if (Math.Abs((float)(y1 - y2 - 6.0)) >= 1.0) { BaseEffect selectFrame = SelectFrame; pointF1 = SelectFrame.DestPoint; double y3 = pointF1.Y; pointF1 = menuItem2.OriginalPosition; double y4 = pointF1.Y; double num = Math.Abs((float)(y3 - y4 - 6.0)) / 5.0; selectFrame.Velocity = (float)num; if (SelectFrame.Velocity > 16.0) { SelectFrame.Velocity = 16f; } else if (SelectFrame.Velocity < 2.0) { SelectFrame.Velocity = 2f; } } BaseEffect selectFrame1 = SelectFrame; pointF1 = menuItem2.OriginalPosition; PointF pointF2 = new PointF(0.0f, (float)(pointF1.Y + 6.0)); selectFrame1.DestPoint = pointF2; } } base.UpdateData(); if (0 <= TimeMain && TimeMain < 130) { BackgroundLight += 4; if (BackgroundLight <= byte.MaxValue) { return; } BackgroundLight = byte.MaxValue; } else { BackgroundLight = byte.MaxValue; } }
public override void ProcessKeys() { if (this.KClass.ArrowDown && (this.LastDown == 0 || this.LastDown > 30)) { this.MenuSelectIndex += 13; this.StageData.SoundPlay("se_select00.wav"); this.SelectItemChanged(); } if (this.KClass.ArrowUp && (this.LastUp == 0 || this.LastUp > 30)) { this.MenuSelectIndex -= 13; this.StageData.SoundPlay("se_select00.wav"); this.SelectItemChanged(); } if (this.KClass.ArrowLeft && (this.LastLeft == 0 || this.LastLeft > 30)) { --this.MenuSelectIndex; if ((this.MenuSelectIndex + 1) % 13 == 0) { this.MenuSelectIndex += 13; } this.StageData.SoundPlay("se_select00.wav"); this.SelectItemChanged(); } if (this.KClass.ArrowRight && (this.LastRight == 0 || this.LastRight > 30)) { ++this.MenuSelectIndex; if (this.MenuSelectIndex % 13 == 0) { this.MenuSelectIndex -= 13; } this.StageData.SoundPlay("se_select00.wav"); this.SelectItemChanged(); } if (this.KClass.Key_Z && this.LastZ == 0) { this.MenuItemList[this.MenuSelectIndex].Click(); this.OnChangeMenu = this.TimeMain + 1; } if (this.KClass.Key_X && this.LastX == 0) { if (this.NameIndex > 0) { --this.NameIndex; this.PlayerName[this.NameIndex] = (string)null; } this.StageData.SoundPlay("se_cancel00.wav"); this.ShowPlayerName(); } if (!this.KClass.Key_ESC) { return; } this.OnRemoveMenu = this.TimeMain + 20; this.TransparentVelocity = -15f; foreach (BaseMenuItem menuItem in this.MenuItemList) { BaseMenuItem baseMenuItem = menuItem; PointF originalPosition = this.MenuItemList[0].OriginalPosition; double x = (double)originalPosition.X; originalPosition = this.MenuItemList[0].OriginalPosition; double y = (double)originalPosition.Y; PointF pointF = new PointF((float)x, (float)y); baseMenuItem.DestPoint = pointF; menuItem.OnRemove = true; } this.StageData.SoundPlay("se_cancel00.wav"); }
public MenuGroup_PlayerData(StageDataPackage StageData) : base(StageData) { TransparentValueF = 0.0f; MaxTransparent = byte.MaxValue; TransparentVelocity = 5f; TxtureObject = TextureObjectDictionary["MenuBackground"]; Rectangle boundRect = BoundRect; double num1 = (boundRect.Width / 2); boundRect = BoundRect; double num2 = (boundRect.Height / 2); OriginalPosition = new PointF((float)num1, (float)num2); AngleDegree = 90.0; ColorValue = Color.FromArgb(30, 110, 150); MenuTitlePos1 = new PointF(140f, -30f); MenuTitlePos2 = new PointF(140f, -150f); BaseMenuItem baseMenuItem1 = new BaseMenuItem(StageData, "MenuTitle_PlayerData") { Position = MenuTitlePos2 }; MenuTilte = baseMenuItem1; ClearHistoryList = new List <BaseMenuItem>(); MenuPlaneSelectIndex = 0; MenuItemListPlane = new List <BaseMenuItem>() { new BaseMenuItem(StageData, "History_ReimuA"), new BaseMenuItem(StageData, "History_MarisaA"), new BaseMenuItem(StageData, "History_SanaeA"), new BaseMenuItem(StageData, "History_KoishiA") }; int num3 = 90; int num4 = 90; int num5 = 0; foreach (BaseMenuItem baseMenuItem2 in MenuItemListPlane) { baseMenuItem2.DestPoint = new PointF(num3, num4); baseMenuItem2.Position = new PointF((num3 + num5), num4); baseMenuItem2.UnSelectVisible = false; baseMenuItem2.Vibrateable = false; } MenuItemListPlane[MenuSelectIndex].Selected = true; MenuSelectIndex = 0; MenuItemList = new List <BaseMenuItem>() { new BaseMenuItem(StageData, "History_Easy"), new BaseMenuItem(StageData, "History_Normal"), new BaseMenuItem(StageData, "History_Hard"), new BaseMenuItem(StageData, "History_Lunatic"), new BaseMenuItem(StageData, "History_Extra") }; int num6 = 480; int num7 = 90; int num8 = 0; foreach (BaseMenuItem menuItem in MenuItemList) { menuItem.DestPoint = new PointF(num6, num7); menuItem.Position = new PointF((num6 + num8), num7); menuItem.UnSelectVisible = false; menuItem.Vibrateable = false; } MenuItemList[MenuSelectIndex].Selected = true; ScorePageList = new List <DescriptionMenuItem>(); AddNewScorePage(); }
public MenuGroup_ScoreSaver(StageDataPackage StageData, PointF OriginalPosition) : base(StageData) { this.OriginalPosition = OriginalPosition; this.ScoreHistorys = new List <BaseMenuItem>(); for (int index = 0; index < 10; ++index) { this.ScoreHistorys.Add((BaseMenuItem) new DescriptionMenuItem(StageData, string.Format("{0:00}", (object)(index + 1)))); } StageDataPackage stageData = StageData.GlobalData.LastState.StageData; for (int index1 = 0; index1 < stageData.S_History.Count; ++index1) { if (stageData.MyPlane.Score > stageData.S_History[index1].Score) { ScoreHistory scoreHistory1 = new ScoreHistory(); scoreHistory1.MyPlaneFullName = stageData.MyPlane.FullName; scoreHistory1.Rank = stageData.Difficulty; scoreHistory1.PlayerName = ""; scoreHistory1.Score = stageData.MyPlane.Score; ScoreHistory scoreHistory2 = scoreHistory1; DateTime dateTime = DateTime.Now; dateTime = dateTime.Date; string str = dateTime.ToString("yyyy'/'MM'/'dd"); scoreHistory2.Date = str; scoreHistory1.Time = DateTime.Now.ToShortTimeString(); scoreHistory1.Stage = stageData.CurrentStageName; scoreHistory1.SlowRate = stageData.SlowRate; ScoreHistory SH = scoreHistory1; for (int index2 = stageData.S_History.Count - 1; index2 > index1; --index2) { stageData.S_History[index2].Copy(stageData.S_History[index2 - 1]); } stageData.S_History[index1].Copy(SH); this.HistorySelectIndex = index1; break; } } float x = OriginalPosition.X + 12f; float y = OriginalPosition.Y + 30f; int num = 0; foreach (BaseMenuItem scoreHistory in this.ScoreHistorys) { scoreHistory.Position = new PointF(x, (float)(this.BoundRect.Top + 40)); scoreHistory.DestPoint = new PointF(x, y); y += 17f; if (stageData.CurrentStageName.Contains("St")) { ((DescriptionMenuItem)scoreHistory).Description = stageData.S_History[num++].Data2DrawStringSimple(); } else { ((DescriptionMenuItem)scoreHistory).Description = stageData.S_History[num++].Data2DrawString(); } } if (this.HistorySelectIndex >= 0) { this.ScoreHistorys[this.HistorySelectIndex].Selected = true; } string[,] strArray = new string[7, 13] { { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M" }, { "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }, { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m" }, { "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" }, { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "-", "=" }, { ".", ",", "!", "?", "@", ":", ";", "[", "]", "(", ")", "_", "/" }, { "{", "}", "|", "~", "^", "#", "$", "%", "&", "*", " ", "BS", "OK" } }; this.MenuItemList = new List <BaseMenuItem>(); for (int index1 = 0; index1 < 7; ++index1) { for (int index2 = 0; index2 < 13; ++index2) { BaseMenuItem baseMenuItem = (BaseMenuItem) new DescriptionMenuItem(StageData, strArray[index1, index2]); baseMenuItem.OriginalPosition = new PointF((float)(stageData.BoundRect.Left + stageData.BoundRect.Width / 2 - 138), 300f); baseMenuItem.DestPoint = new PointF((float)(stageData.BoundRect.Left + stageData.BoundRect.Width / 2 - 138 + index2 * 22), (float)(270 + index1 * 22)); this.MenuItemList.Add(baseMenuItem); } } this.MenuSelectIndex = this.MenuItemList.Count - 1; if (this.MenuSelectIndex >= 0) { this.MenuItemList[this.MenuSelectIndex].Selected = true; } for (char[] charArray = stageData.PData.PlayerName.ToCharArray(); this.NameIndex < charArray.Length; ++this.NameIndex) { this.PlayerName[this.NameIndex] = charArray[this.NameIndex].ToString(); } this.ShowPlayerName(); }
private void AddNewScorePage() { ScorePageList.Clear(); List <ScoreHistory> all1 = StageData.PData.S_History.FindAll(new Predicate <ScoreHistory>(FindScore)); List <SpellCardHistory> all2 = StageData.PData.SC_History.FindAll(new Predicate <SpellCardHistory>(FindSC)); List <ClearHistory> all3 = StageData.PData.C_History.FindAll(new Predicate <ClearHistory>(FindClear)); switch (ScorePageIndex) { case 0: for (int index = 0; index < all1.Count; ++index) { ScorePageList.Add(new DescriptionMenuItem(StageData, (index + 1).ToString().PadRight(2)) { Description = all1[index].Data2DrawString(), DefaultColor = Color.FromArgb(230 - 15 * index, 230 - 12 * index, byte.MaxValue) }); } int num1 = 50; int num2 = 130; int num3 = 0; using (List <DescriptionMenuItem> .Enumerator enumerator = ScorePageList.GetEnumerator()) { while (enumerator.MoveNext()) { BaseMenuItem current = enumerator.Current; current.DestPoint = new PointF(num1, num2); current.Position = new PointF((num1 + num3), 100f); num2 += 20; } break; } case 1: int num4; for (int index = 0; index < 10; ++index) { if (all2[index].History > 0) { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num4 = all2[index].Index; string Name = num4.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num4 = all2[index].Recorded; string str1 = num4.ToString().PadLeft(2); num4 = all2[index].History; string str2 = num4.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["欧" + all2[index].Name]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } else { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num4 = all2[index].Index; string Name = num4.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num4 = all2[index].Recorded; string str1 = num4.ToString().PadLeft(2); num4 = all2[index].History; string str2 = num4.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["???"]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } } int num5 = 80; int num6 = 130; int num7 = 0; using (List <DescriptionMenuItem> .Enumerator enumerator = ScorePageList.GetEnumerator()) { while (enumerator.MoveNext()) { BaseMenuItem current = enumerator.Current; current.DestPoint = new PointF(num5, num6); current.Position = new PointF((num5 + num7), 100f); num6 += 20; } break; } case 2: int num8; for (int index = 10; index < 20; ++index) { if (all2[index].History > 0) { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num8 = all2[index].Index; string Name = num8.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num8 = all2[index].Recorded; string str1 = num8.ToString().PadLeft(2); num8 = all2[index].History; string str2 = num8.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["欧" + all2[index].Name]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } else { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num8 = all2[index].Index; string Name = num8.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num8 = all2[index].Recorded; string str1 = num8.ToString().PadLeft(2); num8 = all2[index].History; string str2 = num8.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["???"]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } } int num9 = 80; int num10 = 130; int num11 = 0; using (List <DescriptionMenuItem> .Enumerator enumerator = ScorePageList.GetEnumerator()) { while (enumerator.MoveNext()) { BaseMenuItem current = enumerator.Current; current.DestPoint = new PointF(num9, num10); current.Position = new PointF((num9 + num11), 100f); num10 += 20; } break; } case 3: int num12; for (int index = 20; index < Math.Min(all2.Count, 30); ++index) { if (all2[index].History > 0) { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num12 = all2[index].Index; string Name = num12.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num12 = all2[index].Recorded; string str1 = num12.ToString().PadLeft(2); num12 = all2[index].History; string str2 = num12.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["欧" + all2[index].Name]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } else { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num12 = all2[index].Index; string Name = num12.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num12 = all2[index].Recorded; string str1 = num12.ToString().PadLeft(2); num12 = all2[index].History; string str2 = num12.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["???"]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } } int num13 = 80; int num14 = 130; int num15 = 0; using (List <DescriptionMenuItem> .Enumerator enumerator = ScorePageList.GetEnumerator()) { while (enumerator.MoveNext()) { BaseMenuItem current = enumerator.Current; current.DestPoint = new PointF(num13, num14); current.Position = new PointF((num13 + num15), 100f); num14 += 20; } break; } case 4: int num16; for (int index = 30; index < Math.Min(all2.Count, 40); ++index) { if (all2[index].History > 0) { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num16 = all2[index].Index; string Name = num16.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num16 = all2[index].Recorded; string str1 = num16.ToString().PadLeft(2); num16 = all2[index].History; string str2 = num16.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["欧" + all2[index].Name]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } else { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num16 = all2[index].Index; string Name = num16.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num16 = all2[index].Recorded; string str1 = num16.ToString().PadLeft(2); num16 = all2[index].History; string str2 = num16.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["???"]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } } int num17 = 80; int num18 = 130; int num19 = 0; using (List <DescriptionMenuItem> .Enumerator enumerator = ScorePageList.GetEnumerator()) { while (enumerator.MoveNext()) { BaseMenuItem current = enumerator.Current; current.DestPoint = new PointF(num17, num18); current.Position = new PointF((num17 + num19), 100f); num18 += 20; } break; } case 5: int num20; for (int index = 40; index < Math.Min(all2.Count, 50); ++index) { if (all2[index].History > 0) { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num20 = all2[index].Index; string Name = num20.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num20 = all2[index].Recorded; string str1 = num20.ToString().PadLeft(2); num20 = all2[index].History; string str2 = num20.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["欧" + all2[index].Name]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } else { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num20 = all2[index].Index; string Name = num20.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num20 = all2[index].Recorded; string str1 = num20.ToString().PadLeft(2); num20 = all2[index].History; string str2 = num20.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["???"]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } } int num21 = 80; int num22 = 130; int num23 = 0; using (List <DescriptionMenuItem> .Enumerator enumerator = ScorePageList.GetEnumerator()) { while (enumerator.MoveNext()) { BaseMenuItem current = enumerator.Current; current.DestPoint = new PointF(num21, num22); current.Position = new PointF((num21 + num23), 100f); num22 += 20; } break; } } int num24 = 215; int num25 = 350; ClearHistoryList = new List <BaseMenuItem>(); List <BaseMenuItem> clearHistoryList1 = ClearHistoryList; SCMenuItem scMenuItem4 = new SCMenuItem(StageData, "") { OriginalPosition = new PointF(num24, num25), DestPoint = new PointF(num24, num25), Scale = 1f, OffX = 0, OffY = -5, TxtureObject = StageData.TextureObjectDictionary["History_游戏次数"], Description = all3[0].StartTimes.ToString().PadLeft(18, ' '), DefaultColor = Color.FromArgb(230, 230, byte.MaxValue) }; SCMenuItem scMenuItem5 = scMenuItem4; clearHistoryList1.Add(scMenuItem5); int num26 = num25 + 24; long playingTime = all3[0].PlayingTime; string str4 = ((playingTime / 216000L)).ToString("d2") + ":" + ((playingTime % 216000L / 3600L)).ToString("d2") + ":" + ((playingTime % 3600L / 60L)).ToString("d2"); List <BaseMenuItem> clearHistoryList2 = ClearHistoryList; SCMenuItem scMenuItem6 = new SCMenuItem(StageData, "") { OriginalPosition = new PointF(num24, num26), DestPoint = new PointF(num24, num26), Scale = 1f, OffX = 0, OffY = -5, TxtureObject = StageData.TextureObjectDictionary["History_游戏时间"], Description = str4.PadLeft(18, ' '), DefaultColor = Color.FromArgb(230, 230, byte.MaxValue) }; SCMenuItem scMenuItem7 = scMenuItem6; clearHistoryList2.Add(scMenuItem7); int num27 = num26 + 24; List <BaseMenuItem> clearHistoryList3 = ClearHistoryList; SCMenuItem scMenuItem8 = new SCMenuItem(StageData, "") { OriginalPosition = new PointF(num24, num27), DestPoint = new PointF(num24, num27), Scale = 1f, OffX = 0, OffY = -5, TxtureObject = StageData.TextureObjectDictionary["History_通关次数"] }; SCMenuItem scMenuItem9 = scMenuItem8; int num28 = all3[0].ClearTimes; string str5 = num28.ToString().PadLeft(18, ' '); scMenuItem9.Description = str5; scMenuItem8.DefaultColor = Color.FromArgb(230, 230, byte.MaxValue); SCMenuItem scMenuItem10 = scMenuItem8; clearHistoryList3.Add(scMenuItem10); int num29 = num27 + 24; List <BaseMenuItem> clearHistoryList4 = ClearHistoryList; SCMenuItem scMenuItem11 = new SCMenuItem(StageData, "") { OriginalPosition = new PointF(num24, num29), DestPoint = new PointF(num24, num29), Scale = 1f, OffX = 0, OffY = -5, TxtureObject = StageData.TextureObjectDictionary["History_无续关通关次数"] }; SCMenuItem scMenuItem12 = scMenuItem11; num28 = all3[0].NoContinueClearTimes; string str6 = num28.ToString().PadLeft(18, ' '); scMenuItem12.Description = str6; scMenuItem11.DefaultColor = Color.FromArgb(230, 230, byte.MaxValue); SCMenuItem scMenuItem13 = scMenuItem11; clearHistoryList4.Add(scMenuItem13); int num30 = num29 + 24; int num31 = num24 - 70; List <BaseMenuItem> clearHistoryList5 = ClearHistoryList; BaseMenuItem baseMenuItem1 = new BaseMenuItem(StageData, "History_切换") { OriginalPosition = new PointF(num31, num30), DestPoint = new PointF(num31, num30), Scale = 1f, Selected = true }; BaseMenuItem baseMenuItem2 = baseMenuItem1; clearHistoryList5.Add(baseMenuItem2); List <BaseMenuItem> clearHistoryList6 = ClearHistoryList; BaseMenuItem baseMenuItem3 = new BaseMenuItem(StageData, "History_Arrow") { OriginalPosition = new PointF(70f, 95f), DestPoint = new PointF(70f, 95f), Selected = true }; BaseMenuItem baseMenuItem4 = baseMenuItem3; clearHistoryList6.Add(baseMenuItem4); List <BaseMenuItem> clearHistoryList7 = ClearHistoryList; BaseMenuItem baseMenuItem5 = new BaseMenuItem(StageData, "History_Arrow") { OriginalPosition = new PointF(322f, 112f), DestPoint = new PointF(322f, 112f), Selected = true, AngleDegree = 180.0 }; BaseMenuItem baseMenuItem6 = baseMenuItem5; clearHistoryList7.Add(baseMenuItem6); List <BaseMenuItem> clearHistoryList8 = ClearHistoryList; BaseMenuItem baseMenuItem7 = new BaseMenuItem(StageData, "History_Arrow") { OriginalPosition = new PointF(480f, 89f), DestPoint = new PointF(480f, 89f), Selected = true, AngleDegree = 90.0 }; BaseMenuItem baseMenuItem8 = baseMenuItem7; clearHistoryList8.Add(baseMenuItem8); List <BaseMenuItem> clearHistoryList9 = ClearHistoryList; BaseMenuItem baseMenuItem9 = new BaseMenuItem(StageData, "History_Arrow") { OriginalPosition = new PointF(464f, 119f), DestPoint = new PointF(464f, 119f), Selected = true, AngleDegree = -90.0 }; BaseMenuItem baseMenuItem10 = baseMenuItem9; clearHistoryList9.Add(baseMenuItem10); }
public override void ProcessKeys() { if (KClass.ArrowDown && (LastDown == 0 || LastDown > 30)) { MenuSelectIndex += 13; StageData.SoundPlay("se_select00.wav"); SelectItemChanged(); } if (KClass.ArrowUp && (LastUp == 0 || LastUp > 30)) { MenuSelectIndex -= 13; StageData.SoundPlay("se_select00.wav"); SelectItemChanged(); } if (KClass.ArrowLeft && (LastLeft == 0 || LastLeft > 30)) { --MenuSelectIndex; if ((MenuSelectIndex + 1) % 13 == 0) { MenuSelectIndex += 13; } StageData.SoundPlay("se_select00.wav"); SelectItemChanged(); } if (KClass.ArrowRight && (LastRight == 0 || LastRight > 30)) { ++MenuSelectIndex; if (MenuSelectIndex % 13 == 0) { MenuSelectIndex -= 13; } StageData.SoundPlay("se_select00.wav"); SelectItemChanged(); } if (KClass.Key_Z && LastZ == 0) { MenuItemList[MenuSelectIndex].Click(); OnChangeMenu = TimeMain + 1; } if (KClass.Key_X && LastX == 0) { if (NameIndex > 0) { --NameIndex; PlayerName[NameIndex] = null; } StageData.SoundPlay("se_cancel00.wav"); ShowPlayerName(); } if (!KClass.Key_ESC) { return; } OnRemoveMenu = TimeMain + 20; TransparentVelocity = -15f; foreach (BaseMenuItem menuItem in MenuItemList) { BaseMenuItem baseMenuItem = menuItem; PointF originalPosition = MenuItemList[0].OriginalPosition; double x = originalPosition.X; originalPosition = MenuItemList[0].OriginalPosition; double y = originalPosition.Y; PointF pointF = new PointF((float)x, (float)y); baseMenuItem.DestPoint = pointF; menuItem.OnRemove = true; } StageData.SoundPlay("se_cancel00.wav"); }