private void mainMenuScreenEvent(object obj, MainMenu.MenuEventArgs e) { switch (e.nextMenu) { case MainMenu.MenuEventArgs.NextMenu.exit: this.Exit(); break; case MainMenu.MenuEventArgs.NextMenu.none: currentMenu = null; break; case MainMenu.MenuEventArgs.NextMenu.options: currentMenu = optionsMenu; break; case MainMenu.MenuEventArgs.NextMenu.record: musicEngine.skipTrack(); break; } }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { #region Load Menus controllerSelect = new ControllerSelectMenu(this, new ControllerSelectMenu.MenuEventHandler(controllerDetectScreenEvent)); mainMenu = new MainMenu(this, new MainMenu.MenuEventHandler(mainMenuScreenEvent)); optionsMenu = new OptionsMenu(this, new OptionsMenu.MenuEventHandler(optionsMenuScreenEvent)); currentMenu = null; #endregion #region Setup Controls menuControl = new MenuControl(this); #endregion // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); optionsHaveChanged(); }