/// <summary> /// Constructor. /// </summary> public OptionsMenuScreen(Game game) : base(game, "Options") { // Create our menu entries. screenMenuEntry = new MenuEntry(string.Empty); languageMenuEntry = new MenuEntry(string.Empty); cheatsMenuEntry = new MenuEntry(string.Empty); volumeMenuEntry = new MenuEntry(string.Empty); SetMenuEntryText(); MenuEntry back = new MenuEntry("Back"); // Hook up menu event handlers. screenMenuEntry.Selected += ScreenMenuEntrySelected; languageMenuEntry.Selected += LanguageMenuEntrySelected; cheatsMenuEntry.Selected += CheatsMenuEntrySelected; volumeMenuEntry.Selected += VolumeMenuEntrySelected; back.Selected += OnCancel; // Add entries to the menu. MenuEntries.Add(screenMenuEntry); MenuEntries.Add(languageMenuEntry); MenuEntries.Add(cheatsMenuEntry); MenuEntries.Add(volumeMenuEntry); MenuEntries.Add(back); }
/// <summary> /// Constructor. /// </summary> public PauseMenuScreen(Game game) : base(game, "Paused") { // Create our menu entries. MenuEntry resumeGameMenuEntry = new MenuEntry("Resume Game"); MenuEntry quitGameMenuEntry = new MenuEntry("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 fills in the menu contents. /// </summary> public MainMenuScreen(Game game) : base(game, "Main Menu") { // Create our menu entries. MenuEntry playGameMenuEntry = new MenuEntry("Play Game"); MenuEntry optionsMenuEntry = new MenuEntry("Options"); MenuEntry exitMenuEntry = new MenuEntry("Exit"); // 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); }