Exemplo n.º 1
0
 public void displayControllerSelectMenu(bool display)
 {
     if (display)
     {
         currentMenu = controllerSelect;
     }
 }
Exemplo n.º 2
0
 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;
     }
 }
Exemplo n.º 3
0
 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;
     }
 }
Exemplo n.º 4
0
 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
 }
Exemplo n.º 5
0
        /// <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();
        }
Exemplo n.º 6
0
 /// <summary>
 /// Displays the options menu.  To hide, simply call to display the main menu
 /// </summary>
 public void displayOptionsMenu()
 {
     currentMenu = optionsMenu;
 }
Exemplo n.º 7
0
 /// <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;
     }
 }