/// <summary> /// Constructor. /// </summary> public PauseMenuScreen() : base("Paused") { // Flag that there is no need for the game to transition // off when the pause menu is on top of it. IsPopup = true; // Create our menu entries. MenuEntry1 resumeGameMenuEntry = new MenuEntry1("Resume Game"); MenuEntry1 quitGameMenuEntry = new MenuEntry1("Quit Game"); // Hook up menu event handlers. resumeGameMenuEntry.Selected += OnCancel; quitGameMenuEntry.Selected += QuitGameMenuEntrySelected; // Add entries to the menu. MenuEntries.Add(resumeGameMenuEntry); MenuEntries.Add(quitGameMenuEntry); }
/// <summary> /// Constructor. /// </summary> public GameOverScreen() : base("") { // Flag that there is no need for the game to transition // off when the pause menu is on top of it. IsPopup = true; // Create our menu entries. //MenuEntry1 resumeGameMenuEntry = new MenuEntry1("Resume Game"); MenuEntry1 quitGameMenuEntry = new MenuEntry1("Return to Main Menu"); // Hook up menu event handlers. //resumeGameMenuEntry.Selected += OnCancel; quitGameMenuEntry.Selected += ConfirmQuitMessageBoxAccepted; // Add entries to the menu. //MenuEntries.Add(resumeGameMenuEntry); MenuEntries.Add(quitGameMenuEntry); }