private void optionsMenuScreenEvent(object obj, OptionsMenu.MenuEventArgs e) { switch (e.theEvent) { case OptionsMenu.MenuEventArgs.NextMenu.save: currentMenu = mainMenu; optionsHaveChanged(); break; case OptionsMenu.MenuEventArgs.NextMenu.back: currentMenu = mainMenu; 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(); }