/// <summary> /// Save game answer /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void SaveAnswer(object sender, EventArgs e) { if (((MessageBox)sender).DialogResult == DialogResult.Yes) { //GameScreen.Team.SaveParty(); Camp.Exit(); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void MessageBox_Selected(object sender, EventArgs e) { if (((MessageBox)sender).DialogResult == DialogResult.Yes && Camp != null) { Camp.Game.SaveGameSlot(SelectedSlot); Camp.Exit(); } }
/// <summary> /// Save game answer /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void DropAnswer(object sender, EventArgs e) { if (((MessageBox)sender).DialogResult == DialogResult.Yes) { GameScreen.Team.DropHero(Hero); Camp.Exit(); } Hero = null; }
/// <summary> /// Exit button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void Slot_Selected(object sender, EventArgs e) { ScreenButton button = sender as ScreenButton; // Empty slot if (string.IsNullOrEmpty(button.Text)) { return; } SelectedSlot = (int)(button.Tag); // If ingame, then load the savegame if (Camp != null) { Camp.Game.LoadGameSlot(SelectedSlot); Camp.Exit(); } }
/// <summary> /// Exit button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void slot_Selected(object sender, EventArgs e) { ScreenButton button = sender as ScreenButton; SelectedSlot = (int)(button.Tag); // Slot not empty, ask confirmation if (!string.IsNullOrEmpty(button.Text)) { MessageBox = new MessageBox("Are you sure you<br />wish to SAVE<br />the game ?", MessageBoxButtons.YesNo); MessageBox.Selected += new EventHandler(MessageBox_Selected); return; } // If ingame, then load the savegame if (Camp != null) { Camp.Game.SaveGameSlot(SelectedSlot); Camp.Exit(); } }