public void displayControllerSelectMenu(bool display) { if (display) { currentMenu = controllerSelect; } }
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; } }
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; } }
private void controllerDetectScreenEvent(object obj, ControllerSelectMenu.MenuEventArgs e) { Options.OptionsData currentSettings = options.getOptionsData(); currentSettings.gamePad = e.gamepad; currentSettings.controller = e.controllerNo; options.setOptionsData(currentSettings); currentMenu = null; //closes the controller select menu }
/// <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(); }
/// <summary> /// Displays the options menu. To hide, simply call to display the main menu /// </summary> public void displayOptionsMenu() { currentMenu = optionsMenu; }
/// <summary> /// Displays or hides the main menu /// </summary> /// <param name="display">Whether to display or hide the main menu</param> public void displayMainMenu(Boolean display) { if (display) { currentMenu = mainMenu; } else { currentMenu = null; } }