private void tyyEscDlg_Load(object sender, EventArgs e) { buttonList.Add(buttonContinue); buttonList.Add(buttonSave); buttonList.Add(buttonExit); this.buttonLocInit(); timerAnimation.Interval = 1; timerAnimation.Enabled = true; TYYCoreGUI.tyyButtonColorChange(buttonList[buttonChoseIndex], false); axButPlayer.URL = locData.tyyButtonSound; axButPlayer.Ctlcontrols.stop(); this.Size = new Size(400, 300); this.CenterToParent(); }
private void tyySettingDlg_Load(object sender, EventArgs e) { buttonList.Add(buttonBGM); this.buttonLocInit(); isNeedBgm = myLocData.tyyGetIsBgmNeed(); if (isNeedBgm) { pictureCheck.Image = Properties.Resources.chc; } else { pictureCheck.Image = null; } TYYCoreGUI.tyyButtonColorChange(buttonList[buttonChoseIndex], false); timerAnimation.Enabled = true; this.Size = new Size(400, 300); this.CenterToParent(); }
private void tyyEscDlg_KeyDown(object sender, KeyEventArgs e) { switch (e.KeyCode) { case Keys.Up: if (buttonChoseIndex == 0) { buttonChoseIndex = 2; TYYCoreGUI.tyyButtonColorChange(buttonContinue, true); TYYCoreGUI.tyyButtonColorChange(buttonExit, false); } else { buttonChoseIndex--; TYYCoreGUI.tyyButtonColorChange(buttonList[buttonChoseIndex + 1], true); TYYCoreGUI.tyyButtonColorChange(buttonList[buttonChoseIndex], false); } break; case Keys.Down: if (buttonChoseIndex == 2) { buttonChoseIndex = 0; TYYCoreGUI.tyyButtonColorChange(buttonExit, true); TYYCoreGUI.tyyButtonColorChange(buttonContinue, false); } else { buttonChoseIndex++; TYYCoreGUI.tyyButtonColorChange(buttonList[buttonChoseIndex - 1], true); TYYCoreGUI.tyyButtonColorChange(buttonList[buttonChoseIndex], false); } break; case Keys.Space: if (buttonChoseIndex == 0) //继续 { this.Hide(); } else if (buttonChoseIndex == 1) //保存 { TYYCoreGUI.tyyErrMsg("So sorry that we don't offer Save Function in this game" + "\n" + "VWRD is terribly sorry"); //TYYCoreDataSav saveData = new TYYCoreDataSav(); //saveData.tyySaveMapInfo(_mapLoc, _mapPath); } else if (buttonChoseIndex == 2) //退出 { Application.Exit(); } break; case Keys.Escape: this.Hide(); break; default: return; } axButPlayer.Ctlcontrols.stop(); axButPlayer.Ctlcontrols.play(); }