/// <summary> /// Constructor. /// </summary> public OptionsMenuScreen() : base("") { // Create our menu entries. ungulateMenuEntry = new MenuEntry(string.Empty); languageMenuEntry = new MenuEntry(string.Empty); frobnicateMenuEntry = new MenuEntry(string.Empty); elfMenuEntry = new MenuEntry(string.Empty); SetMenuEntryText(); MenuEntry backMenuEntry = new MenuEntry("\n\n\n\n\n\n\n Back"); // Hook up menu event handlers. ungulateMenuEntry.Selected += UngulateMenuEntrySelected; languageMenuEntry.Selected += LanguageMenuEntrySelected; frobnicateMenuEntry.Selected += FrobnicateMenuEntrySelected; elfMenuEntry.Selected += ElfMenuEntrySelected; backMenuEntry.Selected += OnCancel; // Add entries to the menu. MenuEntries.Add(ungulateMenuEntry); MenuEntries.Add(languageMenuEntry); MenuEntries.Add(frobnicateMenuEntry); MenuEntries.Add(elfMenuEntry); MenuEntries.Add(backMenuEntry); }
/// <summary> /// Constructor fills in the menu contents. /// </summary> public MainMenuScreen() : base("") { // Create our menu entries. MenuEntry playGameMenuEntry = new MenuEntry("\n\n\n\n\n\n\n Play Game"); MenuEntry optionsMenuEntry = new MenuEntry("\n\n\n\n\n\n\n Options"); MenuEntry exitMenuEntry = new MenuEntry("\n\n\n\n\n\n\n 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); }