void MenuEntrySelected(object sender, PlayerIndexEventArgs e) { MenuEntry selected = sender as MenuEntry; ToDelete = selected.Text; string message = Langue.tr("MapDel") + ToDelete + " ?\n"; MessageBoxScreen confirmExitMessageBox = new MessageBoxScreen(message); confirmExitMessageBox.Accepted += MessageBoxAccepted; ScreenManager.AddScreen(confirmExitMessageBox, e.PlayerIndex); }
void F7Selected(object sender, PlayerIndexEventArgs e) { Labyrinthe.CreerLabyrintheTriple(carte); }
/// <summary> /// Event handler for when the user selects ok on the "are you sure /// you want to delete" message box. This uses the loading screen to /// transition from the game back to the main menu screen. /// </summary> void MessageBoxAccepted(object sender, PlayerIndexEventArgs e) { File.Delete(System.Windows.Forms.Application.StartupPath + "\\Levels\\" + ToDelete); this.ExitScreen(); }
/// <summary> /// Event handler for when the Level X menu entry is selected. /// </summary> void LevelMenuEntrySelected(object sender, PlayerIndexEventArgs e) { MenuEntry selectedLevel = (MenuEntry)sender; LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new GameplayScreen(selectedLevel.Text + ".solo", game, 0)); }
/// <summary> /// Event handler for when the Restart menu entry is selected. /// </summary> void RestartMenuEntrySelected(object sender, PlayerIndexEventArgs e) { LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new GameplayScreen(comingfrom, game, 0)); }
/// <summary> /// Event handler for when the Restart menu entry is selected. /// </summary> void RestartMenuEntrySelected(object sender, PlayerIndexEventArgs e) { if (File.Exists("checkTemp.tmp")) File.Delete("checkTemp.tmp"); LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new GameplayScreen(comingfrom, game, 0)); }
/// <summary> /// Helper overload makes it easy to use OnCancel as a MenuEntry event handler. /// </summary> protected void OnCancel(object sender, PlayerIndexEventArgs e) { OnCancel(e.PlayerIndex); }
/// <summary> /// Event handler for when the Play Solo Game menu entry is selected. /// </summary> void SoloMenuEntrySelected(object sender, PlayerIndexEventArgs e) { LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new LevelSelectSolo(game)); }
/// <summary> /// Event handler for when the user selects ok on the "are you sure /// you want to delete" message box. This uses the loading screen to /// transition from the game back to the main menu screen. /// </summary> void MessageBoxAccepted(object sender, PlayerIndexEventArgs e) { Properties.Unlocked.Default.C2 = false; Properties.Unlocked.Default.C3 = false; Properties.Unlocked.Default.C4 = false; Properties.Unlocked.Default.C5 = false; Properties.Unlocked.Default.C6 = false; Properties.Unlocked.Default.S2 = false; Properties.Unlocked.Default.S3 = false; Properties.Unlocked.Default.S4 = false; Properties.Unlocked.Default.S5 = false; Properties.Unlocked.Default.S6 = false; Properties.Unlocked.Default.Save(); }
/// <summary> /// Event handler for when the Language menu entry is selected. /// </summary> void LanguageMenuEntrySelected(object sender, PlayerIndexEventArgs e) { currentLanguage = (uint)((currentLanguage + 1) % language.Length); SetMenuEntryText(); }
/// <summary> /// Event handler for when the Full Screen menu entry is selected. /// </summary> void FullScreenMenuEntrySelected(object sender, PlayerIndexEventArgs e) { if (ToggleOK) { fullScreen = !fullScreen; game.Toggle(); } SetMenuEntryText(); ToggleOK = !ToggleOK; }
void EraseMenuEntrySelected(object sender, PlayerIndexEventArgs e) { if (!eraselected) { eraselected = true; MessageBoxScreen confirmExitMessageBox = new MessageBoxScreen(Langue.tr("SaveDel")); confirmExitMessageBox.Accepted += MessageBoxAccepted; confirmExitMessageBox.Accepted += MessageBoxCancelled; confirmExitMessageBox.Cancelled += MessageBoxCancelled; ScreenManager.AddScreen(confirmExitMessageBox, e.PlayerIndex); } }
void SaveMapMenuAccepted(object sender, PlayerIndexEventArgs e) { EditorSavePop editorSavePop = new EditorSavePop(nomSauvegarde, 1); editorSavePop.Accepted += SaveMapAccepted; ScreenManager.AddScreen(editorSavePop, ControllingPlayer); }
/// <summary> /// Event handler for when the user selects ok on the "Save Map" message box. /// </summary> void SaveMapAccepted(object sender, PlayerIndexEventArgs e) { EditorSavePop savePop = (EditorSavePop)sender; nomSauvegarde = savePop.nomSauvegarde; SauvegardeMap(); }
void F8Selected(object sender, PlayerIndexEventArgs e) { Labyrinthe.CreerLabyrintheQuadruple(carte); }
/// <summary> /// Event handler for when the Options menu entry is selected. /// </summary> void OptionsMenuEntrySelected(object sender, PlayerIndexEventArgs e) { ScreenManager.AddScreen(new OptionsMenuScreen(0, game), e.PlayerIndex); }
/// <summary> /// Event handler for when the Scores menu entry is selected. /// </summary> void ScoresMenuEntrySelected(object sender, PlayerIndexEventArgs e) { ScreenManager.AddScreen(new ScoresScreen(game), e.PlayerIndex); }
void MessageBoxCancelled(object sender, PlayerIndexEventArgs e) { eraselected = false; }
/// <summary> /// Event handler for when the user selects ok on the "Hi Score" message box. /// </summary> void HiScoreAccepted(object sender, PlayerIndexEventArgs e) { if (Score > S.Default.Score_09) { if (Score > S.Default.Score_08) { if (Score > S.Default.Score_07) { if (Score > S.Default.Score_06) { if (Score > S.Default.Score_05) { if (Score > S.Default.Score_04) { if (Score > S.Default.Score_03) { if (Score > S.Default.Score_02) { if (Score > S.Default.Score_01) { S.Default.Score_10 = S.Default.Score_09; S.Default.Name_10 = S.Default.Name_09; S.Default.Map_10 = S.Default.Map_09; S.Default.Score_09 = S.Default.Score_08; S.Default.Name_09 = S.Default.Name_08; S.Default.Map_09 = S.Default.Map_08; S.Default.Score_08 = S.Default.Score_07; S.Default.Name_08 = S.Default.Name_07; S.Default.Map_08 = S.Default.Map_07; S.Default.Score_07 = S.Default.Score_06; S.Default.Name_07 = S.Default.Name_06; S.Default.Map_07 = S.Default.Map_06; S.Default.Score_06 = S.Default.Score_05; S.Default.Name_06 = S.Default.Name_05; S.Default.Map_06 = S.Default.Map_05; S.Default.Score_05 = S.Default.Score_04; S.Default.Name_05 = S.Default.Name_04; S.Default.Map_05 = S.Default.Map_04; S.Default.Score_04 = S.Default.Score_03; S.Default.Name_04 = S.Default.Name_03; S.Default.Map_04 = S.Default.Map_03; S.Default.Score_03 = S.Default.Score_02; S.Default.Name_03 = S.Default.Name_02; S.Default.Map_03 = S.Default.Map_02; S.Default.Score_02 = S.Default.Score_01; S.Default.Name_02 = S.Default.Name_01; S.Default.Map_02 = S.Default.Map_01; S.Default.Score_01 = Score; S.Default.Name_01 = playerName; S.Default.Map_01 = comingFrom; } else { S.Default.Score_10 = S.Default.Score_09; S.Default.Name_10 = S.Default.Name_09; S.Default.Map_10 = S.Default.Map_09; S.Default.Score_09 = S.Default.Score_08; S.Default.Name_09 = S.Default.Name_08; S.Default.Map_09 = S.Default.Map_08; S.Default.Score_08 = S.Default.Score_07; S.Default.Name_08 = S.Default.Name_07; S.Default.Map_08 = S.Default.Map_07; S.Default.Score_07 = S.Default.Score_06; S.Default.Name_07 = S.Default.Name_06; S.Default.Map_07 = S.Default.Map_06; S.Default.Score_06 = S.Default.Score_05; S.Default.Name_06 = S.Default.Name_05; S.Default.Map_06 = S.Default.Map_05; S.Default.Score_05 = S.Default.Score_04; S.Default.Name_05 = S.Default.Name_04; S.Default.Map_05 = S.Default.Map_04; S.Default.Score_04 = S.Default.Score_03; S.Default.Name_04 = S.Default.Name_03; S.Default.Map_04 = S.Default.Map_03; S.Default.Score_03 = S.Default.Score_02; S.Default.Name_03 = S.Default.Name_02; S.Default.Map_03 = S.Default.Map_02; S.Default.Score_02 = Score; S.Default.Name_02 = playerName; S.Default.Map_02 = comingFrom; } } else { S.Default.Score_10 = S.Default.Score_09; S.Default.Name_10 = S.Default.Name_09; S.Default.Map_10 = S.Default.Map_09; S.Default.Score_09 = S.Default.Score_08; S.Default.Name_09 = S.Default.Name_08; S.Default.Map_09 = S.Default.Map_08; S.Default.Score_08 = S.Default.Score_07; S.Default.Name_08 = S.Default.Name_07; S.Default.Map_08 = S.Default.Map_07; S.Default.Score_07 = S.Default.Score_06; S.Default.Name_07 = S.Default.Name_06; S.Default.Map_07 = S.Default.Map_06; S.Default.Score_06 = S.Default.Score_05; S.Default.Name_06 = S.Default.Name_05; S.Default.Map_06 = S.Default.Map_05; S.Default.Score_05 = S.Default.Score_04; S.Default.Name_05 = S.Default.Name_04; S.Default.Map_05 = S.Default.Map_04; S.Default.Score_04 = S.Default.Score_03; S.Default.Name_04 = S.Default.Name_03; S.Default.Map_04 = S.Default.Map_03; S.Default.Score_03 = Score; S.Default.Name_03 = playerName; S.Default.Map_03 = comingFrom; } } else { S.Default.Score_10 = S.Default.Score_09; S.Default.Name_10 = S.Default.Name_09; S.Default.Map_10 = S.Default.Map_09; S.Default.Score_09 = S.Default.Score_08; S.Default.Name_09 = S.Default.Name_08; S.Default.Map_09 = S.Default.Map_08; S.Default.Score_08 = S.Default.Score_07; S.Default.Name_08 = S.Default.Name_07; S.Default.Map_08 = S.Default.Map_07; S.Default.Score_07 = S.Default.Score_06; S.Default.Name_07 = S.Default.Name_06; S.Default.Map_07 = S.Default.Map_06; S.Default.Score_06 = S.Default.Score_05; S.Default.Name_06 = S.Default.Name_05; S.Default.Map_06 = S.Default.Map_05; S.Default.Score_05 = S.Default.Score_04; S.Default.Name_05 = S.Default.Name_04; S.Default.Map_05 = S.Default.Map_04; S.Default.Score_04 = Score; S.Default.Name_04 = playerName; S.Default.Map_04 = comingFrom; } } else { S.Default.Score_10 = S.Default.Score_09; S.Default.Name_10 = S.Default.Name_09; S.Default.Map_10 = S.Default.Map_09; S.Default.Score_09 = S.Default.Score_08; S.Default.Name_09 = S.Default.Name_08; S.Default.Map_09 = S.Default.Map_08; S.Default.Score_08 = S.Default.Score_07; S.Default.Name_08 = S.Default.Name_07; S.Default.Map_08 = S.Default.Map_07; S.Default.Score_07 = S.Default.Score_06; S.Default.Name_07 = S.Default.Name_06; S.Default.Map_07 = S.Default.Map_06; S.Default.Score_06 = S.Default.Score_05; S.Default.Name_06 = S.Default.Name_05; S.Default.Map_06 = S.Default.Map_05; S.Default.Score_05 = Score; S.Default.Name_05 = playerName; S.Default.Map_05 = comingFrom; } } else { S.Default.Score_10 = S.Default.Score_09; S.Default.Name_10 = S.Default.Name_09; S.Default.Map_10 = S.Default.Map_09; S.Default.Score_09 = S.Default.Score_08; S.Default.Name_09 = S.Default.Name_08; S.Default.Map_09 = S.Default.Map_08; S.Default.Score_08 = S.Default.Score_07; S.Default.Name_08 = S.Default.Name_07; S.Default.Map_08 = S.Default.Map_07; S.Default.Score_07 = S.Default.Score_06; S.Default.Name_07 = S.Default.Name_06; S.Default.Map_07 = S.Default.Map_06; S.Default.Score_06 = Score; S.Default.Name_06 = playerName; S.Default.Map_06 = comingFrom; } } else { S.Default.Score_10 = S.Default.Score_09; S.Default.Name_10 = S.Default.Name_09; S.Default.Map_10 = S.Default.Map_09; S.Default.Score_09 = S.Default.Score_08; S.Default.Name_09 = S.Default.Name_08; S.Default.Map_09 = S.Default.Map_08; S.Default.Score_08 = S.Default.Score_07; S.Default.Name_08 = S.Default.Name_07; S.Default.Map_08 = S.Default.Map_07; S.Default.Score_07 = Score; S.Default.Name_07 = playerName; S.Default.Map_07 = comingFrom; } } else { S.Default.Score_10 = S.Default.Score_09; S.Default.Name_10 = S.Default.Name_09; S.Default.Map_10 = S.Default.Map_09; S.Default.Score_09 = S.Default.Score_08; S.Default.Name_09 = S.Default.Name_08; S.Default.Map_09 = S.Default.Map_08; S.Default.Score_08 = Score; S.Default.Name_08 = playerName; S.Default.Map_08 = comingFrom; } } else { S.Default.Score_10 = S.Default.Score_09; S.Default.Name_10 = S.Default.Name_09; S.Default.Map_10 = S.Default.Map_09; S.Default.Score_09 = Score; S.Default.Name_09 = playerName; S.Default.Map_09 = comingFrom; } } else { S.Default.Score_10 = Score; S.Default.Name_10 = playerName; S.Default.Map_10 = comingFrom; } S.Default.Save(); }
/// <summary> /// Event handler for when the Load Map menu entry is selected. /// </summary> public void LoadMapMenuEntrySelected(object sender, PlayerIndexEventArgs e) { ScreenManager.AddScreen(new LoadMapMenuScreen(game), e.PlayerIndex, true); }
/// <summary> /// This uses the loading screen to transition from the game over screen back to the main menu screen. /// </summary> void AbortMenuEntrySelected(object sender, PlayerIndexEventArgs e) { MediaPlayer.Stop(); if (File.Exists("checkTemp.tmp")) File.Delete("checkTemp.tmp"); LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen(game)); }
/// <summary> /// Event handler for when the user selects ok on the "are you sure /// you want to quit" message box. This uses the loading screen to /// transition from the game back to the main menu screen. /// </summary> void ConfirmQuitMessageBoxAccepted(object sender, PlayerIndexEventArgs e) { LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen(game)); if (File.Exists("checkTemp.tmp")) File.Delete("checkTemp.tmp"); MediaPlayer.Stop(); }
/// <summary> /// Event handler for when the Restart menu entry is selected. /// </summary> void NextMenuEntrySelected(object sender, PlayerIndexEventArgs e) { LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new GameplayScreen(next, game, 0)); }
void PresetsMapMenuEntrySelected(object sender, PlayerIndexEventArgs e) { Presets presetsScreen = new Presets(game); presetsScreen.F1Selected += F1; presetsScreen.F1Selected += OnCancel; presetsScreen.F2Selected += F2; presetsScreen.F2Selected += OnCancel; presetsScreen.F3Selected += F3; presetsScreen.F3Selected += OnCancel; presetsScreen.F4Selected += F4; presetsScreen.F4Selected += OnCancel; presetsScreen.F5Selected += F5; presetsScreen.F5Selected += OnCancel; presetsScreen.F6Selected += F6; presetsScreen.F6Selected += OnCancel; presetsScreen.F7Selected += F7; presetsScreen.F7Selected += OnCancel; presetsScreen.F8Selected += F8; presetsScreen.F8Selected += OnCancel; ScreenManager.AddScreen(presetsScreen, e.PlayerIndex, true); }
/// <summary> /// This uses the loading screen to transition from the game over screen back to the main menu screen. /// </summary> void AbortMenuEntrySelected(object sender, PlayerIndexEventArgs e) { LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen(game)); }
/// <summary> /// Event handler for when the Quit Game menu entry is selected. /// </summary> void QuitGameMenuEntrySelected(object sender, PlayerIndexEventArgs e) { string message; if (mod == 2) message = Langue.tr("EditMsgBox"); else message = Langue.tr("GameMsgBox"); MessageBoxScreen confirmQuitMessageBox = new MessageBoxScreen(message); confirmQuitMessageBox.Accepted += ConfirmQuitMessageBoxAccepted; ScreenManager.AddScreen(confirmQuitMessageBox, ControllingPlayer); }
/// <summary> /// Event handler for when the user selects ok on the "are you sure /// you want to exit" message box. /// </summary> void ConfirmExitMessageBoxAccepted(object sender, PlayerIndexEventArgs e) { ScreenManager.Game.Exit(); }
///<summary> ///Event handler for when the Map Editor menu entry is selected. ///</summary> void EditorMenuEntrySelected(object sender, PlayerIndexEventArgs e) { LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new EditorScreen("", game)); }
void MenuEntrySelected(object sender, PlayerIndexEventArgs e) { // MenuEntry selected = (MenuEntry) sender; <-- très beau aussi! MenuEntry selected = sender as MenuEntry; LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new EditorScreen(selected.Text, game)); }
void F6Selected(object sender, PlayerIndexEventArgs e) { Labyrinthe.CreerLabyrintheDouble(carte); }