/// <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. MenuEntry resumeGameMenuEntry = new MenuEntry("Resume Game"); MenuEntry saveGameMenuEntry = new MenuEntry("Save Game"); MenuEntry concedeGameMenuEntry = new MenuEntry("Concede Game"); MenuEntry quitGameMenuEntry = new MenuEntry("Quit Game"); // Hook up menu event handlers. resumeGameMenuEntry.Selected += OnCancel; quitGameMenuEntry.Selected += QuitGameMenuEntrySelected; saveGameMenuEntry.Selected += SaveGameMenuEntrySelected; concedeGameMenuEntry.Selected += ConcedeGameMenuEntrySelected; // Add entries to the menu. MenuEntries.Add(resumeGameMenuEntry); MenuEntries.Add(saveGameMenuEntry); MenuEntries.Add(concedeGameMenuEntry); MenuEntries.Add(quitGameMenuEntry); }
/// <summary> /// Constructor fills in the menu contents. /// </summary> public MainMenuScreen() : base("Game Menu") { // Create our menu entries. MenuEntry playGameMenuEntry = new MenuEntry("Play Game"); MenuEntry optionsMenuEntry = new MenuEntry("Options"); MenuEntry exitMenuEntry = new MenuEntry("Main Menu"); // Hook up menu event handlers. playGameMenuEntry.Selected += PlayGameMenuEntrySelected; optionsMenuEntry.Selected += OptionsMenuEntrySelected; exitMenuEntry.Selected += OnCancel; // Add entries to the menu. MenuEntries.Add(playGameMenuEntry); MenuEntries.Add(optionsMenuEntry); MenuEntries.Add(exitMenuEntry); }
/// <summary> /// Constructor. /// </summary> public OptionsMenuScreen() : base("Options") { // Create our menu entries. VenueMenuEntry = new MenuEntry(string.Empty); ObstacleMenuEntry = new MenuEntry(string.Empty); SoundMenuEntry = new MenuEntry(string.Empty); SetMenuEntryText(); MenuEntry backMenuEntry = new MenuEntry("Back"); // Hook up menu event handlers. VenueMenuEntry.Selected += VenueMenuEntrySelected; ObstacleMenuEntry.Selected += ObstacleMenuEntrySelected; SoundMenuEntry.Selected += SoundMenuEntrySelected; backMenuEntry.Selected += OnCancel; // Add entries to the menu. MenuEntries.Add(VenueMenuEntry); MenuEntries.Add(ObstacleMenuEntry); MenuEntries.Add(SoundMenuEntry); MenuEntries.Add(backMenuEntry); }