Ejemplo n.º 1
0
        public override void Activate(Renderer renderer)
        {
            base.Activate(renderer);

            string    fontPath        = ContentManager.GetContentPath("Arcade");
            Color     fontColorWhite  = Styles.Colors.White;
            const int fontSizeTitle   = 18;
            const int fontSizeContent = 14;

            labelTitle = ControlFactory.CreateLabel(ContentManager, fontPath, fontSizeTitle, fontColorWhite, "Select a Scenario");
            labelTitle.EnableShadow(ContentManager, 2, 2);

            textureBackgroundTile = ContentManager.GetTexture("BackgroundScenarioTile");

            iconFrame          = ControlFactory.CreateIcon(ContentManager, "MenuScenarioFrame");
            iconFrame.Position = new Vector(MainGame.SCREEN_WIDTH_LOGICAL / 2 - iconFrame.Width / 2, MainGame.SCREEN_HEIGHT_LOGICAL / 2 - iconFrame.Height / 2);

            iconFrameInputNames          = ControlFactory.CreateIcon(ContentManager, "MenuScenarioFrame2");
            iconFrameInputNames.Position = new Vector(MainGame.SCREEN_WIDTH_LOGICAL / 2 - iconFrameInputNames.Width / 2, MainGame.SCREEN_HEIGHT_LOGICAL / 2 - iconFrameInputNames.Height / 2);
            iconFrameInputNames.Visible  = false;

            labelTitle.Position = iconFrame.Position + new Vector(9, 13);

            buttonSelect             = ControlFactory.CreateButton(ContentManager, "ButtonSquare", "ButtonSquareHover");
            buttonSelect.Icon        = ControlFactory.CreateIcon(ContentManager, "IconWindowConfirm");
            buttonSelect.IconHovered = ControlFactory.CreateIcon(ContentManager, "IconWindowConfirm");
            buttonSelect.ButtonType  = ButtonType.IconOnly;
            buttonSelect.Visible     = false;
            buttonSelect.Clicked    += buttonSelect_Clicked;

            buttonBack             = ControlFactory.CreateButton(ContentManager, "ButtonSquare", "ButtonSquare");
            buttonBack.Icon        = ControlFactory.CreateIcon(ContentManager, "IconArrowCircleLeft");
            buttonBack.IconHovered = ControlFactory.CreateIcon(ContentManager, "IconArrowCircleLeft");
            buttonBack.ButtonType  = ButtonType.IconOnly;
            buttonBack.Clicked    += ButtonBackOnClicked;
            buttonBack.Position    = iconFrame.Position + new Vector(0, iconFrame.Height + 3);

            AddScenarioItem("OfficeOrthogonal1", "ScenarioThumbnail1", "ScenarioThumbnail1Selected", "ScenarioOverview1", "A Fresh Start (Plain)", "Fresh out of college, you're on top of the world. You're an aspiring manager who has been given a once in a lifetime opportunity to create a successful business. If you can manage to stay in business for 6 months, you might just prove to your parents that you aren't a loser after all.");
            AddScenarioItem("OfficeOrthogonal1", "ScenarioThumbnail1", "ScenarioThumbnail1Selected", "ScenarioOverview1", "Broke as a Joke (Mild)", "After investing the company's money into a pyramid scheme, you find yourself at the bottom of the barrel. Your credit cards are maxed out, and your spouse is thinking of leaving you. How will you manage to bring the company back to its former glory?");
            AddScenarioItem("OfficeOrthogonal1", "ScenarioThumbnail1", "ScenarioThumbnail1Selected", "ScenarioOverview1", "Mutiny! (Spicy)", "Your employees are just one empty snack machine away from finally quitting. Unless you can convince them to stay by proving that the company is worth their time, you will surely find yourself on the streets (again). Maybe this time you'll decide that restocking the toilet paper makes employees happy.");
            AddScenarioItem("OfficeOrthogonal1", "ScenarioThumbnail1", "ScenarioThumbnail1Selected", "ScenarioOverview1", "Monopoly City (Spicy)", "You're a small fish in a huge ocean dominated by a single, massive shark. While that shark is around, there's no way you'll be able to grow large enough to knock him out of the water. Do what it takes to destroy the monopoly's stranglehold on the market you desire.");
            AddScenarioItem("OfficeOrthogonal2", "ScenarioThumbnail1", "ScenarioThumbnail1Selected", "ScenarioOverview1", "Sandbox Mode", "So you don't want to follow the rules, huh? You're probably a hotshot CEO of a Fortune 500 company, aren't you? Well look no further, you finally found somewhere to express your talents.");

            textboxInputPlayerName          = new Textbox(ContentManager);
            textboxInputPlayerName.Visible  = false;
            textboxInputPlayerName.Position = iconFrameInputNames.Position + new Vector(200, 60);
            textboxInputPlayerName.Clicked += (sender, e) => textboxInputCompanyName.Blur();
            textboxInputPlayerName.Blurred += textboxInputPlayerName_Blurred;

            textboxInputCompanyName          = new Textbox(ContentManager);
            textboxInputCompanyName.Visible  = false;
            textboxInputCompanyName.Position = iconFrameInputNames.Position + new Vector(200, 95);
            textboxInputCompanyName.Clicked += (sender, e) => textboxInputPlayerName.Blur();
            textboxInputCompanyName.Blurred += textboxInputCompanyName_Blurred;

            labelInputPlayerName = ControlFactory.CreateLabel(ContentManager, fontPath, fontSizeContent, fontColorWhite, "Your Name:");
            labelInputPlayerName.EnableShadow(ContentManager, 2, 2);
            labelInputPlayerName.Position = new Vector(textboxInputPlayerName.Bounds.Left - labelInputPlayerName.Width - 5, textboxInputPlayerName.Position.Y + textboxInputPlayerName.Height / 2 - labelInputPlayerName.Height / 2);
            labelInputPlayerName.Visible  = false;
            labelInputCompanyName         = ControlFactory.CreateLabel(ContentManager, fontPath, fontSizeContent, fontColorWhite, "Company Name:");
            labelInputCompanyName.EnableShadow(ContentManager, 2, 2);
            labelInputCompanyName.Position = new Vector(textboxInputCompanyName.Bounds.Left - labelInputCompanyName.Width - 5, textboxInputCompanyName.Position.Y + textboxInputCompanyName.Height / 2 - labelInputCompanyName.Height / 2);
            labelInputCompanyName.Visible  = false;
        }