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(); }