Exemplo n.º 1
0
 /// <summary>
 /// Event handler for when the Concede Game menu entry is selected.
 /// </summary>
 void ConcedeGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     const string message = "Concede this game?";
     MessageBoxScreen confirmQuitMessageBox = new MessageBoxScreen(message);
     confirmQuitMessageBox.Accepted += ConfirmQuitMessageBoxAccepted;
     ScreenManager.AddScreen(confirmQuitMessageBox, ControllingPlayer);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Event handler for when the Obstacle menu entry is selected.
 /// </summary>
 void ObstacleMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     AudioManager.PlayCue("Menu_Accept");
     Obstacle = !Obstacle;
     Class_Library.Helper.SetObstacleOption(Obstacle);
     SetMenuEntryText();
 }
Exemplo n.º 3
0
 void WinningMessageBoxAccepted(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen());
 }
Exemplo n.º 4
0
 /// <summary>
 /// Event handler for when the Sound menu entry is selected.
 /// </summary>
 void SoundMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     AudioManager.PlayCue("Menu_Accept");
     Sound = !Sound;
     SetMenuEntryText();
 }
Exemplo n.º 5
0
 /// <summary>
 /// Event handler for when the Venue  change .
 /// </summary>
 void VenueMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     AudioManager.PlayCue("Menu_Accept");
     currentVenue = (currentVenue + 1) % Venue.Length;
     Helper.SetVenue(currentVenue);
     SetMenuEntryText();
 }
Exemplo n.º 6
0
        /// <summary>
        /// This is Fired when the Save Message Box is Fired
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void confirmSaveMessageBoxAccepted(object sender, PlayerIndexEventArgs e)
        {
            //Transfer SaveTempGame (saveGame.xml) to SaveGameList
            SaveGame myTempGame = new SaveGame();
            XMLHelper<SaveGame> TempXML = new XMLHelper<SaveGame>();
            TempXML.Load(ref myTempGame);

            SaveGameList mySaveGameList = new SaveGameList();
            XMLHelper<SaveGameList> SaveGameXML = new XMLHelper<SaveGameList>();
            SaveGameXML.Load(ref mySaveGameList);

            mySaveGameList.AddItem(myTempGame);
            SaveGameXML.Save(mySaveGameList);

            LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen());
        }
Exemplo n.º 7
0
 /// <summary>
 /// Event handler for when the Save Game menu entry is selected.
 /// </summary>
 void SaveGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     const string message = "Save Current Game?";
     MessageBoxScreen confirmSaveMessageBox = new MessageBoxScreen(message);
     confirmSaveMessageBox.Accepted += confirmSaveMessageBoxAccepted;
     ScreenManager.AddScreen(confirmSaveMessageBox, ControllingPlayer);
 }
Exemplo n.º 8
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);
 }
Exemplo n.º 9
0
 /// <summary>
 /// Event handler for when the Play Game menu entry is selected.
 /// </summary>
 void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, e.PlayerIndex,
                        new ComputerPong());
 }
Exemplo n.º 10
0
 /// <summary>
 /// Event handler for when the Options menu entry is selected.
 /// </summary>
 void OptionsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     ScreenManager.AddScreen(new OptionsMenuScreen(), e.PlayerIndex);
 }
Exemplo n.º 11
0
 /// <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)
 {
     //AudioManager.StopMusic();
     ScreenManager.Game.Exit();
 }