/// <summary> /// Constructor. /// </summary> public PauseMenuScreen() : base("Pause") { IsPopup = true; MenuEntry resumeGameMenuEntry = new MenuEntry("RESUME"); MenuEntry quitGameMenuEntry = new MenuEntry("QUIT"); resumeGameMenuEntry.Selected += OnCancel; quitGameMenuEntry.Selected += QuitGameMenuEntrySelected; // Create our menu entries. songMenuEntry = new MenuEntry("SONG:"); playMenuEntry = new MenuEntry("PLAY"); MenuEntry backMenuEntry = new MenuEntry("BACK"); // Hook up menu event handlers. songMenuEntry.Selected += SongMenuEntrySelected; playMenuEntry.Selected += PlayMenuEntrySelected; backMenuEntry.Selected += OnCancel; // Add entries to the menu. MenuEntries.Add(resumeGameMenuEntry); MenuEntries.Add(songMenuEntry); MenuEntries.Add(playMenuEntry); MenuEntries.Add(quitGameMenuEntry); if (playingSongIndex != -1) { selectedSongIndex = playingSongIndex; } TransitionOnTime = TimeSpan.FromSeconds(0.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); }
public MainMenuScreen() : base("Main") { // Create our menu entries MenuEntry startGameMenuEntry = new MenuEntry("Start Game"); MenuEntry exitMenuEntry = new MenuEntry("Quit"); // Hook up menu event handlers startGameMenuEntry.Selected += new EventHandler<EventArgs>(startGameMenuEntry_Selected); exitMenuEntry.Selected += OnCancel; // Add entries to the menu MenuEntries.Add(startGameMenuEntry); MenuEntries.Add(exitMenuEntry); }
/// <summary> /// Constructor fills in the menu contents. /// </summary> public MainMenuScreen() : base("Main") { // Create our menu entries. MenuEntry startGameMenuEntry = new MenuEntry("START GAME"); MenuEntry exitMenuEntry = new MenuEntry("QUIT"); // Hook up menu event handlers. startGameMenuEntry.Selected += StartGameMenuEntrySelected; exitMenuEntry.Selected += OnCancel; // Add entries to the menu. MenuEntries.Add(startGameMenuEntry); MenuEntries.Add(exitMenuEntry); }
public PauseScreen() : base("Pause") { // Create our menu entries. MenuEntry startGameMenuEntry = new MenuEntry("Return"); MenuEntry highScoreEntry = new MenuEntry("Exit"); Button resume = new Button("", "button_resume"); resume.Tapped += resume_Tapped; Button mainMenu = new Button("", "button_resume"); mainMenu.Tapped += mainMenu_Tapped; //startGameMenuEntry.Selected += StartGameMenuEntrySelected; //highScoreEntry.Selected += OnCancel; // Add entries to the menu. //MenuEntries.Add(startGameMenuEntry); //MenuEntries.Add(highScoreEntry); }