Beispiel #1
0
        /// <summary>
        /// Event handler for when the Quit Game menu entry is selected.
        /// </summary>
        private void QuitGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            const string message = "Wollen Sie das Spiel wirklich beenden?";

            var confirmQuitMessageBox = new MessageBoxScreen(message);

            confirmQuitMessageBox.Accepted += ConfirmQuitMessageBoxAccepted;

            ScreenManager.AddScreen(confirmQuitMessageBox, ControllingPlayer);
        }
Beispiel #2
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);
 }
Beispiel #3
0
 /// <summary>
 /// Event handler for when the user selects ok on the "are you sure
 /// you want to exit" message box.
 /// </summary>
 private void ConfirmExitMessageBoxAccepted(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.Game.Exit();
 }
Beispiel #4
0
 private void levelEditorMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     Process.Start(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) +
                   "\\Leveleditor\\Leveleditor.exe");
 }
Beispiel #5
0
 /// <summary>
 /// Event handler for when the Options menu entry is selected.
 /// </summary>
 private void OptionsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     //ScreenManager.AddScreen(new OptionsMenuScreen(), e.PlayerIndex);
 }
Beispiel #6
0
 /// <summary>
 /// Event handler for when the Play Game menu entry is selected.
 /// </summary>
 private void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new SelectLevelScreen(), e.PlayerIndex);
 }
Beispiel #7
0
 private static void towerEditorMenuEntry_Selected(object sender, PlayerIndexEventArgs e)
 {
     Process.Start(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) +
                   "\\Towereditor\\Towereditor.exe");
 }
 /// <summary>
 /// Event handler for when the user selects ok on the "are you sure
 /// you want to exit" message box.
 /// </summary>
 private void ConfirmExitMessageBoxAccepted(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.Game.Exit();
 }
 private void levelEditorMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     Process.Start(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) +
                   "\\Leveleditor\\Leveleditor.exe");
 }
Beispiel #10
0
 /// <summary>
 /// Event handler for when the Options menu entry is selected.
 /// </summary>
 private void OptionsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     //ScreenManager.AddScreen(new OptionsMenuScreen(), e.PlayerIndex);
 }
Beispiel #11
0
 /// <summary>
 /// Event handler for when the Play Game menu entry is selected.
 /// </summary>
 private void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new SelectLevelScreen(), e.PlayerIndex);
 }
Beispiel #12
0
 private static void towerEditorMenuEntry_Selected(object sender, PlayerIndexEventArgs e)
 {
     Process.Start(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) +
                   "\\Towereditor\\Towereditor.exe");
 }
Beispiel #13
0
 /// <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>
 private void ConfirmQuitMessageBoxAccepted(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen());
 }
Beispiel #14
0
 private void entry_Selected(object sender, PlayerIndexEventArgs e)
 {
     string Level = ((MenuEntry) sender).Text;
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new GamePlayScreen(Level,ScreenManager));
 }
Beispiel #15
0
 private void exitEntry_Selected(object sender, PlayerIndexEventArgs e)
 {
     ExitScreen();
 }