This is the main type for your game
Inheritance: Microsoft.Xna.Framework.Game
Exemplo n.º 1
0
        private MSCityScreen(MoodSwing game)
            : base(game.Content.Load<Texture2D>("SelectDistrict"), 200, 200, 200, 200, Color.White, game.SpriteBatch, game)
        {
            MSAnimatingButton startGameButton = new MSAnimatingButton(
                    null,
                    new OpenDistrictScreen(MSDistrictScreen.DistrictName.FEAR),
                    new Rectangle(330, 250, 559, 60),
                    game.Content.Load<Texture2D>("1"),
                    game.Content.Load<Texture2D>("1Hovered"),
                    game.Content.Load<Texture2D>("1Hovered"),
                    Color.White,
                    null,
                    Shape.AMORPHOUS,
                    SpriteBatch,
                    Game);

            startGameButton.HoverPosition = new ShiftRight75();
            startGameButton.UnhoverPosition = new ShiftLeft75();

            MSAnimatingButton startGame2 = new MSAnimatingButton(
                    null,
                    new OpenDistrictScreen(MSDistrictScreen.DistrictName.SADNESS),
                    new Rectangle(350, 350, 472, 60),
                    game.Content.Load<Texture2D>("2"),
                    game.Content.Load<Texture2D>("2Hovered"),
                    game.Content.Load<Texture2D>("2Hovered"),
                    Color.White,
                    null,
                    Shape.AMORPHOUS,
                    SpriteBatch,
                    Game);

            startGame2.HoverPosition = new ShiftRight75();
            startGame2.UnhoverPosition = new ShiftLeft75();

            MSAnimatingButton startGame3 = new MSAnimatingButton(
                    null,
                    new OpenDistrictScreen(MSDistrictScreen.DistrictName.ANGER),
                    new Rectangle(300, 450, 574, 60),
                    game.Content.Load<Texture2D>("3"),
                    game.Content.Load<Texture2D>("3Hovered"),
                    game.Content.Load<Texture2D>("3Hovered"),
                    Color.White,
                    null,
                    Shape.AMORPHOUS,
                    SpriteBatch,
                    Game);

            startGame3.HoverPosition = new ShiftRight75();
            startGame3.UnhoverPosition = new ShiftLeft75();

            MSAnimatingButton ret = new MSAnimatingButton(
                    null,
                    OpenMainScreen.GetInstance(),
                    new Rectangle(300, 550, 574, 60),
                    game.Content.Load<Texture2D>("back"),
                    game.Content.Load<Texture2D>("backHovered"),
                    game.Content.Load<Texture2D>("backHovered"),
                    Color.White,
                    null,
                    Shape.AMORPHOUS,
                    SpriteBatch,
                    Game);

            ret.HoverPosition = new ShiftRight75();
            ret.UnhoverPosition = new ShiftLeft75();

            AddComponent(startGameButton);

            AddComponent(startGame2);

            AddComponent(startGame3);
            AddComponent(ret);
            //AddComponent(new MSPanel(Game.Content.Load<Texture2D>("gamescreen"), new Rectangle(0, 0, MSResolution.VirtualWidth, MSResolution.VirtualHeight), null, Shape.AMORPHOUS, SpriteBatch, Game));
        }
Exemplo n.º 2
0
        private MSMainScreen(MoodSwing game)
            : base(game.Content.Load<Texture2D>("Main Menu"), 200, 200, 200, 200, Color.White, game.SpriteBatch, game)
        {
            MSAnimatingButton startGameButton = new MSAnimatingButton(
                    null,
                    OpenCityScreen.GetInstance(),
                    new Rectangle(330, 250, 559, 60),
                    game.Content.Load<Texture2D>("startgame"),
                    game.Content.Load<Texture2D>("startgameclicked"),
                    game.Content.Load<Texture2D>("startgameclicked"),
                    Color.White,
                    null,
                    Shape.AMORPHOUS,
                    SpriteBatch,
                    Game);

            startGameButton.HoverPosition = new ShiftRight75();
            startGameButton.UnhoverPosition = new ShiftLeft75();

            MSAnimatingButton optionsButton = new MSAnimatingButton(
                    null,
                    OpenOptionsScreen.GetInstance(),
                    new Rectangle(350, 350, 472, 60),
                    game.Content.Load<Texture2D>("options"),
                    game.Content.Load<Texture2D>("optionsclicked"),
                    game.Content.Load<Texture2D>("optionsclicked"),
                    Color.White,
                    null,
                    Shape.AMORPHOUS,
                    SpriteBatch,
                    Game);

            optionsButton.HoverPosition = new ShiftRight75();
            optionsButton.UnhoverPosition = new ShiftLeft75();

            MSAnimatingButton res = new MSAnimatingButton(
                    null,
                    (new ClearSave()),
                    new Rectangle(300, 450, 574, 60),
                    game.Content.Load<Texture2D>("back"),
                    game.Content.Load<Texture2D>("backHovered"),
                    game.Content.Load<Texture2D>("backHovered"),
                    Color.White,
                    null,
                    Shape.AMORPHOUS,
                    SpriteBatch,
                    Game);

            res.HoverPosition = new ShiftRight75();
            res.UnhoverPosition = new ShiftLeft75();

            MSAnimatingButton exitButton = new MSAnimatingButton(
                    null,
                    new OpenExitConfirmation(OpenExitConfirmation.ExitType.ToWindows),
                    new Rectangle(300, 550, 574, 60),
                    game.Content.Load<Texture2D>("exit"),
                    game.Content.Load<Texture2D>("exitclicked"),
                    game.Content.Load<Texture2D>("exitclicked"),
                    Color.White,
                    null,
                    Shape.AMORPHOUS,
                    SpriteBatch,
                    Game);

            exitButton.HoverPosition = new ShiftRight75();
            exitButton.UnhoverPosition = new ShiftLeft75();

            AddComponent(startGameButton);

            AddComponent(optionsButton);
            AddComponent(res);
            AddComponent(exitButton);
            AddComponent(new MSPanel(Game.Content.Load<Texture2D>("gamescreen"), new Rectangle(0, 0, MSResolution.VirtualWidth, MSResolution.VirtualHeight), null, Shape.AMORPHOUS, SpriteBatch, Game));
        }
Exemplo n.º 3
0
        public MSDistrictScreen(DistrictName district, MoodSwing game)
            : base(game.Content.Load<Texture2D>("districtmap"), 0, 0, 0, 0, game.SpriteBatch, game)
        {
            gameTime = 0;
            lastTotalRunTime = 0;

            this.name = district;
            String filename = "";
            if (district == DistrictName.FEAR)
            {
                filename = @"Content\smallMap.txt";
                districtName = "small";
                ultiGoal = 3;
            }
            else if (district == DistrictName.SADNESS)
            {
                filename = @"Content\mediumMap.txt";
                districtName = "medium";
                ultiGoal = 6;
            }
            else if (district == DistrictName.ANGER)
            {
                filename = @"Content\largeMap.txt";
                districtName = "large";
                ultiGoal = 8;
            }
            map = new MSMap(filename);

            MSCamera.initialize((game as MoodSwing).GraphicsDevice.Viewport,
                MSDistrictHall.getInstance().Position, MSDistrictHall.getInstance().Rotation);
            //citizensList = new List<MSCitizen>();
            unitHandler = MSUnitHandler.Restart();
            moodManager = MSMoodManager.GetInstance();
            MSMoodManager.Reset();
            resourceManager = MSResourceManager.GetInstance();
            MSResourceManager.instantiate(1000, map.InitialVolunteerCenters);

            foreach (MS3DTile tile in map.MapArray)
            {
                tile.LightSource = map.LightSource;
            }

            blackOutPanel = new MSPanel
            (
                game.Content.Load<Texture2D>("BlackOut"),
                BoundingRectangle,
                null,
                Shape.RECTANGULAR,
                spriteBatch,
                game
            );
            blackOutPanel.Visible = false;
            AddComponent(blackOutPanel);

            MSToolTip idleVolunteersToolTip = new MSToolTip
            (
                null,
                new Rectangle(52, 25, 50, 14),
                SpriteBatch,
                Game
            );
            MSPanel idleVolunteersPanel = new MSPanel
            (
                null,
                new Rectangle(52, 25, 50, 14),
                idleVolunteersToolTip,
                Shape.RECTANGULAR,
                SpriteBatch,
                Game
            );
            idleVolunteers = new MSTextField
            (
                "0",
                new Rectangle(82, 25, 20, 14),
                null,
                null,
                4,
                game.Content.Load<SpriteFont>("TopPanel"),
                Color.White,
                spriteBatch,
                game
            );
            idleVolunteersPanel.AddComponent(idleVolunteers);
            idleVolunteersToolTip.AddComponent(new MSWrappingLabel
            (
                new Point(82, 39),
                "Idle Volunteers",
                Game.Content.Load<SpriteFont>("ToolTipFont"),
                Color.White,
                Game.Content.Load<Texture2D>("BlackOut"),
                3, 3, 3, 3, null, null,
                SpriteBatch,
                Game
            ));

            MSToolTip totalVolunteersToolTip = new MSToolTip
            (
                null,
                new Rectangle(152, 25, 80, 14),
                SpriteBatch,
                Game
            );
            MSPanel totalVolunteersPanel = new MSPanel
            (
                null,
                new Rectangle(152, 25, 80, 14),
                totalVolunteersToolTip,
                Shape.RECTANGULAR,
                SpriteBatch,
                Game
            );
            totalVolunteers = new MSTextField(
                "0/0",
                new Rectangle(192, 34, 40, 14),
                null,
                null,
                9,
                game.Content.Load<SpriteFont>("TopPanel"),
                Color.White,
                spriteBatch,
                game);
            totalVolunteersPanel.AddComponent(totalVolunteers);
            totalVolunteersToolTip.AddComponent(new MSWrappingLabel
            (
                new Point(192, 48),
                "Total Volunteers/Volunteer Limit",
                Game.Content.Load<SpriteFont>("ToolTipFont"),
                Color.White,
                Game.Content.Load<Texture2D>("BlackOut"),
                3, 3, 3, 3, null, null,
                SpriteBatch,
                Game
            ));

            MSToolTip fundsToolTip = new MSToolTip
            (
                null,
                new Rectangle(262, 44, 150, 20),
                SpriteBatch,
                Game
            );
            MSPanel fundsPanel = new MSPanel
            (
                null,
                new Rectangle(262, 44, 150, 20),
                fundsToolTip,
                Shape.RECTANGULAR,
                SpriteBatch,
                Game
            );
            funds = new MSTextField
            (
                "0",
                new Rectangle(332, 44, 80, 20),
                null,
                null,
                8,
                game.Content.Load<SpriteFont>("TopPanel"),
                Color.White,
                spriteBatch,
                game
            );
            fundsPanel.AddComponent(funds);
            fundsToolTip.AddComponent(new MSWrappingLabel
            (
                new Point(332, 64),
                "Funds",
                Game.Content.Load<SpriteFont>("ToolTipFont"),
                Color.White,
                Game.Content.Load<Texture2D>("BlackOut"),
                3, 3, 3, 3, null, null,
                SpriteBatch,
                Game
            ));

            MSPanel topPanelBack = new MSPanel
            (
                Game.Content.Load<Texture2D>("GamePanel/WhiteBG"),
                new Rectangle(0, 0, 1024, 91),
                null,
                Shape.AMORPHOUS,
                SpriteBatch,
                Game
            );

            AddComponent(topPanelBack, Alignment.TOP_CENTER);

            MSPanel topPanel = new MSPanel
            (
                Game.Content.Load<Texture2D>("GamePanel/TopPanel"),
                new Rectangle(0, 0, 1024, 91),
                null,
                Shape.AMORPHOUS,
                SpriteBatch,
                Game
            );

            topPanel.AddComponent(idleVolunteersPanel);
            topPanel.AddComponent(totalVolunteersPanel);
            topPanel.AddComponent(fundsPanel);

            AddComponent(topPanel, Alignment.TOP_CENTER);

            mainMenuButton = new MSButton(
                null,
                new OpenExitConfirmation(OpenExitConfirmation.ExitType.ToMainMenu),
                new Rectangle(403, 92, 226, 57),
                game.Content.Load<Texture2D>("GamePanel/MainMenu"),
                game.Content.Load<Texture2D>("GamePanel/mainmenuclicked"),
                game.Content.Load<Texture2D>("GamePanel/mainmenuhovered"),
                null,
                Shape.AMORPHOUS,
                spriteBatch,
                game);

            optionsButton = new MSButton(
                null,
                OpenOptionsScreen.GetInstance(),
                new Rectangle(431, 151, 237, 57),
                game.Content.Load<Texture2D>("GamePanel/Options"),
                game.Content.Load<Texture2D>("GamePanel/optionsclicked"),
                game.Content.Load<Texture2D>("GamePanel/optionshovered"),
                null,
                Shape.AMORPHOUS,
                spriteBatch,
                game);

            exitButton = new MSButton(
                null,
                new OpenExitConfirmation(OpenExitConfirmation.ExitType.ToWindows),
                new Rectangle(460, 210, 277, 57),
                game.Content.Load<Texture2D>("GamePanel/quit"),
                game.Content.Load<Texture2D>("GamePanel/quitclicked"),
                game.Content.Load<Texture2D>("GamePanel/quithovered"),
                null,
                Shape.AMORPHOUS,
                spriteBatch,
                game);

            AddComponent(mainMenuButton);
            AddComponent(optionsButton);
            AddComponent(exitButton);

            mainMenuButton.Visible = false;
            optionsButton.Visible = false;
            exitButton.Visible = false;

            openInGameMenu = new MSAnimatingButton(
                   null,
                   new OpenInGameMenu(),
                   new Rectangle(465, 25, 111, 110),
                   game.Content.Load<Texture2D>("GamePanel/Logo"),
                   game.Content.Load<Texture2D>("GamePanel/LogoClicked"),
                   game.Content.Load<Texture2D>("GamePanel/LogoHovered"),
                   Color.White,
                   null,
                   Shape.CIRCULAR,
                   SpriteBatch,
                   Game);
            openInGameMenu.UnclickPosition = new SwingButtonOpenMovement();
            openInGameMenu.UnclickTimerLimit = 12;

            closeInGameMenu = new MSAnimatingButton(
                   null,
                   new CloseInGameMenu(),
                   new Rectangle(639, 235, 111, 110),
                   game.Content.Load<Texture2D>("GamePanel/Logo"),
                   game.Content.Load<Texture2D>("GamePanel/LogoClicked"),
                   game.Content.Load<Texture2D>("GamePanel/LogoHovered"),
                   Color.White,
                   null,
                   Shape.CIRCULAR,
                   SpriteBatch,
                   Game);

            closeInGameMenu.UnclickPosition = new SwingButtonCloseMovement();
            closeInGameMenu.UnclickTimerLimit = 12;
            closeInGameMenu.Visible = false;

            AddComponent(closeInGameMenu);
            AddComponent(openInGameMenu);

            AddComponent(moodManager.PovertyProgressBar);
            AddComponent(moodManager.EducationProgressBar);
            AddComponent(moodManager.GenderEqualityProgressBar);
            AddComponent(moodManager.ChildHealthProgressBar);
            AddComponent(moodManager.MaternalHealthProgressBar);
            AddComponent(moodManager.HivAidsProgressBar);
            AddComponent(moodManager.EnvironmentProgressBar);
            AddComponent(moodManager.GlobalPartnershipProgressBar);

            MSImageHolder translucentOverlay = new MSImageHolder
            (
                new Rectangle(0, 0, 1024, 91),
                Game.Content.Load<Texture2D>("GamePanel/translucent"),
                SpriteBatch,
                Game
            );

            AddComponent(translucentOverlay);

            Paused = false;
            MSStory.Init(district);
            load();
        }
Exemplo n.º 4
0
        private MSOptionsScreen(MoodSwing game)
            : base(game.Content.Load<Texture2D>("CityView"), 150, 150, 150, 150, game.SpriteBatch, game)
        {
            MSTabbedPanel tabbedOptions = new MSTabbedPanel(this);
            MSPanel graphicsTab = new MSPanel(Game.Content.Load<Texture2D>("BlackOut"), new Rectangle(50, 50, 924, 668), 50, 50, 50, 50, null, Shape.RECTANGULAR, SpriteBatch, Game);
            tabbedOptions.AddTab(new MSTab(
                new MSButton(
                    new MSFontScalingLabel(
                        "Graphics",
                        new Rectangle(50, 0, 100, 25),
                        Game.Content.Load<SpriteFont>("Temp"),
                        SpriteBatch,
                        Game),
                    new DoNothing(),
                    new Rectangle(0, 0, 50, 50),
                    game.Content.Load<Texture2D>("unchecked"),
                    game.Content.Load<Texture2D>("uncheckedclicked"),
                    game.Content.Load<Texture2D>("uncheckedhovered"),
                    null,
                    Shape.RECTANGULAR,
                    SpriteBatch,
                    Game),
                new MSButton(
                    new MSFontScalingLabel(
                        "Graphics",
                        new Rectangle(50, 0, 100, 25),
                        Game.Content.Load<SpriteFont>("Temp"),
                        SpriteBatch,
                        Game),
                    new DoNothing(),
                    new Rectangle(0, 0, 50, 50),
                    game.Content.Load<Texture2D>("checked"),
                    game.Content.Load<Texture2D>("checkedclicked"),
                    game.Content.Load<Texture2D>("checkedhovered"),
                    null,
                    Shape.RECTANGULAR,
                    SpriteBatch,
                    Game),
                    true,
                    graphicsTab));

            graphicsTab.AddComponent(new MSCheckbox(
                new MSButton(
                    new MSFontScalingLabel(
                        "Full Screen",
                        new Rectangle(50, 0, 100, 25),
                        Game.Content.Load<SpriteFont>("Temp"),
                        Color.White,
                        SpriteBatch,
                        Game),
                    new ToggleFullScreen(true),
                    new Rectangle(0, 0, 50, 50),
                    game.Content.Load<Texture2D>("unchecked"),
                    game.Content.Load<Texture2D>("uncheckedclicked"),
                    game.Content.Load<Texture2D>("uncheckedhovered"),
                    null,
                    Shape.RECTANGULAR,
                    SpriteBatch,
                    Game),
                new MSButton(
                    new MSFontScalingLabel(
                        "Full Screen",
                        new Rectangle(50, 0, 100, 25),
                        Game.Content.Load<SpriteFont>("Temp"),
                        Color.White,
                        SpriteBatch,
                        Game),
                    new ToggleFullScreen(false),
                    new Rectangle(0, 0, 50, 50),
                    game.Content.Load<Texture2D>("checked"),
                    game.Content.Load<Texture2D>("checkedclicked"),
                    game.Content.Load<Texture2D>("checkedhovered"),
                    null,
                    Shape.RECTANGULAR,
                    SpriteBatch,
                    Game),
                 MSResolution.IsFullScreen), Alignment.TOP_LEFT);

            graphicsTab.AddComponent(new MSCheckbox(
                new MSButton(
                    new MSFontScalingLabel(
                        "Bloom",
                        new Rectangle(50, 0, 100, 25),
                        Game.Content.Load<SpriteFont>("Temp"),
                        Color.White,
                        SpriteBatch,
                        Game),
                    new ToggleBloom(true),
                    new Rectangle(0, 0, 50, 50),
                    game.Content.Load<Texture2D>("unchecked"),
                    game.Content.Load<Texture2D>("uncheckedclicked"),
                    game.Content.Load<Texture2D>("uncheckedhovered"),
                    null,
                    Shape.RECTANGULAR,
                    SpriteBatch,
                    Game),
                new MSButton(
                    new MSFontScalingLabel(
                        "Bloom",
                        new Rectangle(50, 0, 100, 25),
                        Game.Content.Load<SpriteFont>("Temp"),
                        Color.White,
                        SpriteBatch,
                        Game),
                    new ToggleBloom(false),
                    new Rectangle(0, 0, 50, 50),
                    game.Content.Load<Texture2D>("checked"),
                    game.Content.Load<Texture2D>("checkedclicked"),
                    game.Content.Load<Texture2D>("checkedhovered"),
                    null,
                    Shape.RECTANGULAR,
                    SpriteBatch,
                    Game),
                game.Bloom.Visible), Alignment.MIDDLE_LEFT);

            MSPanel resolutionPanel = new MSPanel(null, new Rectangle(500, 60, 150, 200), null, Shape.RECTANGULAR, SpriteBatch, Game);
            MSRadioButtonGroup resolution = new MSRadioButtonGroup(resolutionPanel);
            resolution.AddRadioButton(
                new MSRadioButton(
                    new MSButton(
                        new MSFontScalingLabel(
                        "800 by 600",
                        new Rectangle(50, 0, 100, 25),
                        Game.Content.Load<SpriteFont>("Temp"),
                        Color.White,
                        SpriteBatch,
                        Game),
                        new ChangeResolution(800, 600),
                        new Rectangle(0, 0, 50, 50),
                        game.Content.Load<Texture2D>("unchecked"),
                        game.Content.Load<Texture2D>("uncheckedclicked"),
                        game.Content.Load<Texture2D>("uncheckedhovered"),
                        null,
                        Shape.RECTANGULAR,
                        SpriteBatch,
                        Game),
                    new MSButton(
                        new MSFontScalingLabel(
                        "800 by 600",
                        new Rectangle(50, 0, 100, 25),
                        Game.Content.Load<SpriteFont>("Temp"),
                        Color.White,
                        SpriteBatch,
                        Game),
                        null,
                        new Rectangle(0, 0, 50, 50),
                        game.Content.Load<Texture2D>("checked"),
                        game.Content.Load<Texture2D>("checkedclicked"),
                        game.Content.Load<Texture2D>("checkedhovered"),
                        null,
                        Shape.RECTANGULAR,
                        SpriteBatch,
                        Game),
                    MSResolution.Width == 800 && MSResolution.Height == 600), Alignment.TOP_CENTER);

            resolution.AddRadioButton(
                new MSRadioButton(
                    new MSButton(
                        new MSFontScalingLabel(
                        "1024 by 768",
                        new Rectangle(50, 0, 100, 25),
                        Game.Content.Load<SpriteFont>("Temp"),
                        Color.White,
                        SpriteBatch,
                        Game),
                        new ChangeResolution(1024, 768),
                        new Rectangle(0, 0, 50, 50),
                        game.Content.Load<Texture2D>("unchecked"),
                        game.Content.Load<Texture2D>("uncheckedclicked"),
                        game.Content.Load<Texture2D>("uncheckedhovered"),
                        null,
                        Shape.RECTANGULAR,
                        SpriteBatch,
                        Game),
                    new MSButton(
                        new MSFontScalingLabel(
                        "1024 by 768",
                        new Rectangle(50, 0, 100, 25),
                        Game.Content.Load<SpriteFont>("Temp"),
                        Color.White,
                        SpriteBatch,
                        Game),
                        null,
                        new Rectangle(0, 0, 50, 50),
                        game.Content.Load<Texture2D>("checked"),
                        game.Content.Load<Texture2D>("checkedclicked"),
                        game.Content.Load<Texture2D>("checkedhovered"),
                        null,
                        Shape.RECTANGULAR,
                        SpriteBatch,
                        Game),
                    MSResolution.Width == 1024 && MSResolution.Height == 768), Alignment.MIDDLE_CENTER);

            resolution.AddRadioButton(
                new MSRadioButton(
                    new MSButton(
                        new MSFontScalingLabel(
                        "1280 by 800",
                        new Rectangle(50, 0, 100, 25),
                        Game.Content.Load<SpriteFont>("Temp"),
                        Color.White,
                        SpriteBatch,
                        Game),
                        new ChangeResolution(1280, 800),
                        new Rectangle(0, 0, 50, 50),
                        game.Content.Load<Texture2D>("unchecked"),
                        game.Content.Load<Texture2D>("uncheckedclicked"),
                        game.Content.Load<Texture2D>("uncheckedhovered"),
                        null,
                        Shape.RECTANGULAR,
                        SpriteBatch,
                        Game),
                     new MSButton(
                        new MSFontScalingLabel(
                        "1280 by 800",
                        new Rectangle(50, 0, 100, 25),
                        Game.Content.Load<SpriteFont>("Temp"),
                        Color.White,
                        SpriteBatch,
                        Game),
                        null,
                        new Rectangle(0, 0, 50, 50),
                        game.Content.Load<Texture2D>("checked"),
                        game.Content.Load<Texture2D>("checkedclicked"),
                        game.Content.Load<Texture2D>("checkedhovered"),
                        null,
                        Shape.RECTANGULAR,
                        SpriteBatch,
                        Game),
                    MSResolution.Width == 1280 && MSResolution.Height == 800), Alignment.BOTTOM_CENTER);
            graphicsTab.AddComponent(resolutionPanel, Alignment.TOP_RIGHT);
            AddComponent(graphicsTab);

            MSPanel audioTab = new MSPanel(Game.Content.Load<Texture2D>("BlackOut"), new Rectangle(50, 50, 924, 668), 50, 50, 50, 50, null, Shape.RECTANGULAR, SpriteBatch, Game);
            tabbedOptions.AddTab(new MSTab(
                new MSButton(
                    new MSFontScalingLabel(
                        "Audio",
                        new Rectangle(50, 0, 100, 25),
                        Game.Content.Load<SpriteFont>("Temp"),
                        SpriteBatch,
                        Game),
                    new DoNothing(),
                    new Rectangle(200, 0, 50, 50),
                    game.Content.Load<Texture2D>("unchecked"),
                    game.Content.Load<Texture2D>("uncheckedclicked"),
                    game.Content.Load<Texture2D>("uncheckedhovered"),
                    null,
                    Shape.RECTANGULAR,
                    SpriteBatch,
                    Game),
                new MSButton(
                    new MSFontScalingLabel(
                        "Audio",
                        new Rectangle(50, 0, 100, 25),
                        Game.Content.Load<SpriteFont>("Temp"),
                        SpriteBatch,
                        Game),
                    new DoNothing(),
                    new Rectangle(200, 0, 50, 50),
                    game.Content.Load<Texture2D>("checked"),
                    game.Content.Load<Texture2D>("checkedclicked"),
                    game.Content.Load<Texture2D>("checkedhovered"),
                    null,
                    Shape.RECTANGULAR,
                    SpriteBatch,
                    Game),
                    false,
                    audioTab));
            AddComponent(audioTab);

            MSPanel gameplayTab = new MSPanel(Game.Content.Load<Texture2D>("BlackOut"), new Rectangle(50, 50, 924, 668), 50, 50, 50, 50, null, Shape.RECTANGULAR, SpriteBatch, Game);
            tabbedOptions.AddTab(new MSTab(
                new MSButton(
                    new MSFontScalingLabel(
                        "Gameplay",
                        new Rectangle(50, 0, 100, 25),
                        Game.Content.Load<SpriteFont>("Temp"),
                        SpriteBatch,
                        Game),
                    new DoNothing(),
                    new Rectangle(400, 0, 50, 50),
                    game.Content.Load<Texture2D>("unchecked"),
                    game.Content.Load<Texture2D>("uncheckedclicked"),
                    game.Content.Load<Texture2D>("uncheckedhovered"),
                    null,
                    Shape.RECTANGULAR,
                    SpriteBatch,
                    Game),
                new MSButton(
                    new MSFontScalingLabel(
                        "Gameplay",
                        new Rectangle(50, 0, 100, 25),
                        Game.Content.Load<SpriteFont>("Temp"),
                        SpriteBatch,
                        Game),
                    new DoNothing(),
                    new Rectangle(400, 0, 50, 50),
                    game.Content.Load<Texture2D>("checked"),
                    game.Content.Load<Texture2D>("checkedclicked"),
                    game.Content.Load<Texture2D>("checkedhovered"),
                    null,
                    Shape.RECTANGULAR,
                    SpriteBatch,
                    Game),
                    false,
                    gameplayTab));
            AddComponent(gameplayTab);

            AddComponent(new MSButton(
                    null,
                    ReturnFromOptionsScreen.GetInstance(),
                    new Rectangle(0, 0, 574, 60),
                    game.Content.Load<Texture2D>("exit"),
                    game.Content.Load<Texture2D>("exitclicked"),
                    game.Content.Load<Texture2D>("exit"),
                    Color.White,
                    null,
                    Shape.RECTANGULAR,
                    SpriteBatch,
                    Game)
                    , Alignment.BOTTOM_CENTER);
        }
Exemplo n.º 5
0
 public static MoodSwing GetInstance()
 {
     if (MSInstance == null)
         MSInstance = new MoodSwing();
     return MSInstance;
 }