/// <summary> /// Constructor. /// </summary> public OptionsScreen() : base("Options") { // Create our menu entries. MusicMenuEntry = new MenuEntry(string.Empty); SoundMenuEntry = new MenuEntry(string.Empty); VolumeMusicMenuEntry = new MenuEntry(string.Empty); VolumeSoundMenuEntry = new MenuEntry(string.Empty); SetMenuEntryText(); MenuEntry back = new MenuEntry("Back"); // Hook up menu event handlers. MusicMenuEntry.Selected += MusicMenuEntrySelected; SoundMenuEntry.Selected += SoundMenuEntrySelected; VolumeMusicMenuEntry.Left += VolumeMusicMenuEntryLeft; VolumeMusicMenuEntry.Right += VolumeMusicMenuEntryRight; VolumeSoundMenuEntry.Left += VolumeSoundMenuEntryLeft; VolumeSoundMenuEntry.Right += VolumeSoundMenuEntryRight; back.Selected += OnCancel; // Add entries to the menu. MenuEntries.Add(MusicMenuEntry); MenuEntries.Add(SoundMenuEntry); MenuEntries.Add(VolumeMusicMenuEntry); MenuEntries.Add(VolumeSoundMenuEntry); MenuEntries.Add(back); }
/// <summary> /// Constructor. /// </summary> public PauseMenuScreen() : base("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); }
public MainMenuScreen() : base("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); }