Example #1
0
        public tutorialScreen(int w, int h, ContentManager content,
                            GraphicsDeviceManager _graphics)
            : base(0,0,w,h)
        {
            instance = this;
            graphicsH = _graphics.PreferredBackBufferHeight;
            graphicsW = _graphics.PreferredBackBufferWidth;
            //add the panels for the screen interfaces
            UI.ImageLabel tutorialBackground = new UI.ImageLabel
                                (0, _graphics.PreferredBackBufferHeight - panelHeight,
                                content.Load<Texture2D>("menuImages/gameInterfacePanel"));
            tutorialBackground.resize(_graphics.PreferredBackBufferWidth, panelHeight);
            addComponent(tutorialBackground);//panel across the bottom that says tutorial

             Point location = tutorialBackground.getPos();

             UI.ImageLabel tutorialTitle = new UI.ImageLabel(location.X, location.Y, content.Load<Texture2D>("menuImages/tutorialLeveltext"));
             addComponent(tutorialTitle);

             //tutorial header
             tutorialBoxHeader = new UI.ImageLabel((_graphics.PreferredBackBufferWidth / 4)+20, 20, content.Load<Texture2D>("menuImages/tutorialtipbox"));
             //tutorialBoxBackground.resize(panelWidth / 4, panelWidth / 3);
             tutorialBoxHeader.resize(panelWidth / 4, panelWidth / 15);
             addComponent(tutorialBoxHeader);

             location = tutorialBoxHeader.getPos();

             tutorialHeaderText = new UI.TextLabel(location.X, location.Y, tutorialBoxHeader.getWidth(), tutorialBoxHeader.getHeight(),tutorialHeader, Color.White);
             tutorialHeaderText.changeFontScale(0.3f);
             addComponent(tutorialHeaderText);

             //UI.TextLabel tutorialTitle = new UI.TextLabel(location.X, location.Y+20, 1280, 20, "Tutorial Level", Color.White);
             //tutorialTitle.changeFontScale(1);
             //addComponent(tutorialTitle);
             tutorialBoxBackground = new UI.ImageLabel(20, 20,content.Load<Texture2D>("menuImages/tutorialtipbox"));
             //tutorialBoxBackground.resize(panelWidth / 4, panelWidth / 3);
             tutorialBoxBackground.resize(panelWidth / 4, panelWidth / 8);
             addComponent(tutorialBoxBackground);

             location = tutorialBoxBackground.getPos();

            tutorialText = new UI.TextLabel(location.X,location.Y,tutorialBoxBackground.getWidth(), tutorialBoxBackground.getHeight(),tutorialInfo, Color.White);
            tutorialText.changeFontScale(0.3f);
             addComponent(tutorialText);

             menuPanelTutorial = new inGameMenu(w, h, content, _graphics);
             addComponent(menuPanelTutorial);
        }
Example #2
0
        public splashScreen(int w, int h, ContentManager content)
            : base(0, 0, w, h)
        {
            instance = this;
            UI.ImageLabel splashLogo = new UI.ImageLabel(0, 0, content.Load<Texture2D>
                                      ("menuImages/splashScreen[3]"));
            splashLogo.resize(rect.Width, rect.Height);
            addComponent(splashLogo);

            UI.TextLabel keyText = new UI.TextLabel(rect.Width/2, rect.Height-50, 50, 20,
                "**Press any key to continue**", Color.White);
            keyText.changeFontScale(0.5f);
            addComponent(keyText);
            gameStart = true;

            //this.visible = true;
        }