Пример #1
0
 public ControlsPopUp(string message, bool includeUsageText)
     : base(message)
 {
     Vector2 position = new Vector2(Stage.renderer.GraphicsDevice.Viewport.Bounds.Center.X, Stage.renderer.GraphicsDevice.Viewport.Bounds.Center.Y);
     MenuGraphic confirm = new MenuGraphic("MainMenu/controlsDiagram", position, 0.75f);
     MenuEntries.Add(confirm);
 }
Пример #2
0
        public SplashMenu(bool playThemeSong)
            : base("")
        {
            SpriteFont font = Stage.Content.Load<SpriteFont>("DefaultFont");
            MenuGraphic logo = new MenuGraphic("Menu/logo", new Vector2(Stage.renderer.GraphicsDevice.Viewport.Bounds.Center.X, Stage.renderer.GraphicsDevice.Viewport.Bounds.Center.Y), .75f);
            MenuGraphic pressA = new MenuGraphic("Menu/pressA", new Vector2(logo.Dim.Center.X, logo.Dim.Bottom - logo.Dim.Height / 2 + Stage.Content.Load<Texture2D>("UI/Menu/pressA").Height), .75f);
            MenuGraphic bestPlayed = new MenuGraphic("Menu/bestPlayed", new Vector2(pressA.Dim.Center.X, Stage.renderer.GraphicsDevice.Viewport.Bounds.Bottom - Stage.Content.Load<Texture2D>("UI/Menu/bestPlayed").Height), .6f);
            pressA.Flashing = true;

            // Hook up menu event handlers.
            this.GreenButtonPressed += GoToMainMenu;

            // Add entries to the menu.
            MenuEntries.Add(logo);
            MenuEntries.Add(pressA);
            MenuEntries.Add(bestPlayed);

            //hack to makes sure press a is selected, fix.
            selectedEntry = 1;

            Stage.SaveGame.LoadGameData();

            if ( playThemeSong )
                Stage.ActiveStage.GetQB<AudioQB>().ChangeTheme("HORcityday");
        }
        public StrumWarningPopUp(string message, bool includeUsageText)
            : base(message)
        {
            Vector2 position = new Vector2(Stage.renderer.GraphicsDevice.Viewport.Bounds.Center.X, Stage.renderer.GraphicsDevice.Viewport.Bounds.Center.Y);
            MenuGraphic strumWarning = new MenuGraphic("Menu/warning", position, 1f);

            MenuEntries.Add(strumWarning);
        }
        public QuitConfirmPopUp(string message)
            : base(message)
        {
            Vector2 position = new Vector2(Stage.renderer.GraphicsDevice.Viewport.Bounds.Center.X, Stage.renderer.GraphicsDevice.Viewport.Bounds.Center.Y);
            MenuGraphic confirm = new MenuGraphic("Menu/quitConfirm", position, 0.5f);

            MenuEntries.Add(confirm);
        }
Пример #5
0
        public MainMenu()
            : base(" ")
        {
            //Load Game
            MenuGraphic logo = new MenuGraphic("MainMenu/mainMenuLogo", Vector2.Zero, 0.8f);
            MenuGraphic play = new MenuGraphic("MainMenu/play", "MainMenu/play_hover", Vector2.Zero, 0.8f);
            MenuGraphic controls = new MenuGraphic("MainMenu/controls", "MainMenu/controls_hover", Vector2.Zero, 0.8f);
            MenuGraphic options = new MenuGraphic("MainMenu/options", "MainMenu/options_hover", Vector2.Zero, 0.8f);
            //MenuGraphic extras = new MenuGraphic("MainMenu/play"));
            MenuGraphic credits = new MenuGraphic("MainMenu/credits", "MainMenu/credits_hover", Vector2.Zero, 0.8f);
            MenuGraphic exit = new MenuGraphic("MainMenu/exit", "MainMenu/exit_hover", Vector2.Zero, 0.8f);
            mainImage = Stage.Content.Load<Texture2D>("UI/Menu/blank");

            // Hook up menu event handlers.
            play.Selected += PlaySelected;
            controls.Selected += ControlsSelected;
            options.Selected += OptionsSelected;
            //extras.Selected += ExtrasSelected;
            credits.Selected += CredsSelected;
            exit.Selected += OnCancel;

            // Add entries to the menu.
            MenuEntries.Add(logo);
            MenuEntries.Add(play);
            MenuEntries.Add(controls);
            MenuEntries.Add(options);
            //MenuEntries.Add(extras);
            MenuEntries.Add(credits);
            MenuEntries.Add(exit);

            selectBack = Stage.Content.Load<Texture2D>("UI/MainMenu/select_back");

            mainImages = new Texture2D[MenuEntries.Count];
            for (int i = 1; i < MenuEntries.Count; i++)
            {
                MenuGraphic menuEntry = (MenuGraphic)MenuEntries[i];

                mainImages[i] = Stage.Content.Load<Texture2D>("UI/" + menuEntry.TextureName + "Main");
            }
            selectedEntry = 1;
        }
Пример #6
0
        public PauseMenu(string message, bool includeUsageText)
            : base(message)
        {
            Vector2 position = new Vector2(Stage.renderer.GraphicsDevice.Viewport.Bounds.Center.X, Stage.renderer.GraphicsDevice.Viewport.Bounds.Center.Y);
            Stage.ActiveStage.PauseGame();
            MenuGraphic continueGame = new MenuGraphic("Pause/continue", "Pause/continue_hover", position, 0.65f);
            MenuGraphic controls = new MenuGraphic("MainMenu/controls", "MainMenu/controls_hover", position, 0.65f);
            MenuGraphic tune = new MenuGraphic("Pause/tuneMyGear", "Pause/tuneMyGear_hover", position, 0.65f);
            MenuGraphic giveUp = new MenuGraphic("Pause/giveUp", "Pause/giveUp_hover", position, 0.65f);

            continueGame.Selected += ResumeGame;
            controls.Selected += ControlsSelected;
            tune.Selected += OptionsSelected;
            giveUp.Selected += QuitGame;

            background = Stage.Content.Load<Texture2D>("UI/Pause/background");
            back = Stage.Content.Load<Texture2D>("UI/Pause/back");
            select = Stage.Content.Load<Texture2D>("UI/Pause/select");

            MenuEntries.Add(continueGame);
            MenuEntries.Add(controls);
            MenuEntries.Add(tune);
            MenuEntries.Add(giveUp);
        }