Beispiel #1
0
        private void LoadSubmenu()
        {
            MainPanel = new Panel(GameConstants.Content.Load <Texture2D>("Panels/menu/MenuBG"), new Vector2(0, 0));
            // ptDiff, ptCol, ptCon, peCursor;

            ptSettings = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptSettings.AddText(GameConstants.lucidaConsole, "SETTINGS", Color.White, 1f);
            ptDiff = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptDiff.AddText(GameConstants.lucidaConsole, "Difficulty", Color.White, 2.2f);
            ptSound = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptSound.AddText(GameConstants.lucidaConsole, "Sound", Color.White, 2.2f);
            ptCon = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptCon.AddText(GameConstants.lucidaConsole, "Controls", Color.White, 2.2f);
            ptMBack = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptMBack.AddText(GameConstants.lucidaConsole, "Back", Color.White);
            ptDiff2 = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), false);
            ptDiff2.AddText(GameConstants.lucidaConsole, "Difficulty", Color.Red, 2.2f);
            ptSound2 = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), false);
            ptSound2.AddText(GameConstants.lucidaConsole, "Sound", Color.Red, 2.2f);
            ptCon2 = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), false);
            ptCon2.AddText(GameConstants.lucidaConsole, "Controls", Color.Red, 2.2f);
            peCursor = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/menu/cursor"), true);

            MainPanel.Add(ptSettings, new Vector2(0.05f, 0.05f));
            MainPanel.Add(ptDiff, new Vector2(0.1f, 0.3f));
            MainPanel.Add(ptSound, new Vector2(0.1f, 0.45f));
            MainPanel.Add(ptCon, new Vector2(0.1f, 0.6f));
            MainPanel.Add(ptDiff2, new Vector2(0.1f, 0.3f));
            MainPanel.Add(ptSound2, new Vector2(0.1f, 0.45f));
            MainPanel.Add(ptCon2, new Vector2(0.1f, 0.6f));
            MainPanel.Add(ptMBack, new Vector2(0.1f, 0.75f));
            // Can be 0.31 ; 0,46; 0,61; 0,76
            MainPanel.Add(peCursor, new Vector2(0.05f, 0.31f));
        }
Beispiel #2
0
        private void LoadPanel()
        {
            MainPanel = new Panel(GameConstants.Content.Load <Texture2D>("Panels/panel"),
                                  new Vector2(0.1f * GameConstants.WINDOWSIZE.X,
                                              0.1f * GameConstants.WINDOWSIZE.Y));

            peRdy        = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/Rdy"), true);
            pePressJump  = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/pressA"), true);
            pePressJump2 = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/pressB"), false);
            ptJump       = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptJump.AddText(GameConstants.lucidaConsole, "press space \n to Jump", Microsoft.Xna.Framework.Color.White);
            peJumpA = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/JumpA"), true);
            peJumpB = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/JumpB"), false);
            ptRun   = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptRun.AddText(GameConstants.lucidaConsole, "switch lane \n with arrow buttons", Microsoft.Xna.Framework.Color.White);
            peRunA = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/RunA"), false);
            peRunB = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/RunB"), true);


            //TODO: FIX THAT ptRUN and ptJump werent shown
            MainPanel.Add(peRdy, new Vector2(0.3f, 0.44f));
            MainPanel.Add(pePressJump, new Vector2(0.3f, 0.62f));
            MainPanel.Add(pePressJump2, new Vector2(0.3f, 0.62f));
            MainPanel.Add(peRunA, new Vector2(0.6f, 0.2f));
            MainPanel.Add(peRunB, new Vector2(0.6f, 0.2f));
            MainPanel.Add(ptRun, new Vector2(0.6f, 0.1f));
            MainPanel.Add(peJumpA, new Vector2(0.15f, 0.2f));
            MainPanel.Add(peJumpB, new Vector2(0.15f, 0.2f));
            MainPanel.Add(ptJump, new Vector2(0.15f, 0.1f));
        }
Beispiel #3
0
        private void LoadDifficultyPanel()
        {
            DifficultyPanel = new Panel(GameConstants.Content.Load <Texture2D>("Panels/menu/panelMenu"),
                                        new Vector2(0.35f * GameConstants.WINDOWSIZE.X,
                                                    0.1f * GameConstants.WINDOWSIZE.Y));


            ptHeader = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptHeader.AddText(GameConstants.lucidaConsole, "Difficulty", Color.White);
            peEnter = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/menu/Enter"), true);
            peEsc   = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/menu/esc"), true);
            ptBack  = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true); // Text: number of Coins
            ptBack.AddText(GameConstants.lucidaConsole, "Back", Color.White);
            ptConfirm = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptConfirm.AddText(GameConstants.lucidaConsole, "Confirm", Color.White);

            ptEasy = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptEasy.AddText(GameConstants.lucidaConsole, "easy", Color.White, 2.2f);
            ptExtreme = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptExtreme.AddText(GameConstants.lucidaConsole, "extreme", Color.Violet, 2.2f);
            ptHard = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptHard.AddText(GameConstants.lucidaConsole, "hard", Color.White, 2.2f);
            ptMedium = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptMedium.AddText(GameConstants.lucidaConsole, "medium", Color.White);
            ptEasy2 = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), false);
            ptEasy2.AddText(GameConstants.lucidaConsole, "easy", Color.Red, 2.2f);
            ptExtreme2 = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), false);
            ptExtreme2.AddText(GameConstants.lucidaConsole, "extreme", Color.Red, 2.2f);
            ptHard2 = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), false);
            ptHard2.AddText(GameConstants.lucidaConsole, "hard", Color.Red, 2.2f);
            ptMedium2 = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), false);
            ptMedium2.AddText(GameConstants.lucidaConsole, "medium", Color.Red);

            DifficultyPanel.Add(ptHeader, new Vector2(0.1f, 0.1f));
            DifficultyPanel.Add(peEnter, new Vector2(0.13f, 0.8f));
            DifficultyPanel.Add(ptConfirm, new Vector2(0.25f, 0.8f));
            DifficultyPanel.Add(peEsc, new Vector2(0.7f, 0.8f));
            DifficultyPanel.Add(ptBack, new Vector2(0.82f, 0.8f));
            DifficultyPanel.Add(ptEasy, new Vector2(0.4f, 0.2f));
            DifficultyPanel.Add(ptEasy2, new Vector2(0.4f, 0.2f));
            DifficultyPanel.Add(ptMedium, new Vector2(0.4f, 0.34f));
            DifficultyPanel.Add(ptMedium2, new Vector2(0.4f, 0.34f));
            DifficultyPanel.Add(ptHard, new Vector2(0.4f, 0.48f));
            DifficultyPanel.Add(ptHard2, new Vector2(0.4f, 0.48f));
            DifficultyPanel.Add(ptExtreme, new Vector2(0.4f, 0.62f));
            DifficultyPanel.Add(ptExtreme2, new Vector2(0.4f, 0.62f));
        }
Beispiel #4
0
        private void LoadVolumePanel()
        {
            VolumePanel = new Panel(GameConstants.Content.Load <Texture2D>("Panels/menu/panelMenu"),
                                    new Vector2(0.35f * GameConstants.WINDOWSIZE.X,
                                                0.1f * GameConstants.WINDOWSIZE.Y));

            // ptHeader2, ptVolume, ptPlus, ptMinus, pePlus, peMinus, peLine, peMarker
            ptHeader2 = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptHeader2.AddText(GameConstants.lucidaConsole, "Sound", Color.White);
            peEnter = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/menu/Enter"), true);
            peEsc   = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/menu/esc"), true);
            ptBack  = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true); // Text: number of Coins
            ptBack.AddText(GameConstants.lucidaConsole, "Back", Color.White);
            ptConfirm = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptConfirm.AddText(GameConstants.lucidaConsole, "Confirm", Color.White);

            ptVolume = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptVolume.AddText(GameConstants.lucidaConsole, "Volume", Color.White, 2.2f);
            ptPlus = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptPlus.AddText(GameConstants.lucidaConsole, "++", Color.White);
            ptMinus = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptMinus.AddText(GameConstants.lucidaConsole, "--", Color.White);
            pePlusMinus = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/menu/leftright-small"), true);
            peLine      = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/menu/volume"), true);
            peMarker    = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/menu/volumeter"), true);

            VolumePanel.Add(ptHeader2, new Vector2(0.1f, 0.1f));
            VolumePanel.Add(peEnter, new Vector2(0.13f, 0.8f));
            VolumePanel.Add(ptConfirm, new Vector2(0.25f, 0.8f));
            VolumePanel.Add(peEsc, new Vector2(0.7f, 0.8f));
            VolumePanel.Add(ptBack, new Vector2(0.82f, 0.8f));
            VolumePanel.Add(ptVolume, new Vector2(0.42f, 0.2f));
            VolumePanel.Add(ptPlus, new Vector2(0.55f, 0.33f));
            VolumePanel.Add(ptMinus, new Vector2(0.4f, 0.33f));
            VolumePanel.Add(pePlusMinus, new Vector2(0.4f, 0.38f));
            VolumePanel.Add(peLine, new Vector2(0.1f, 0.55f));
            // X in Range (0.1 - 0.82)
            VolumePanel.Add(peMarker, new Vector2(0.1f, 0.55f));

            peMarker.UpdatePositionX(volumeterPos);
        }
Beispiel #5
0
        public void LoadContent()
        {
            background = GameConstants.Content.Load <Texture2D>("Panels/BGScore");

            MainPanel = new Panel(GameConstants.Content.Load <Texture2D>("Panels/panel"),
                                  new Vector2(0.1f * GameConstants.WINDOWSIZE.X,
                                              0.1f * GameConstants.WINDOWSIZE.Y));

            string score    = " Score: " + (ilevelscore - iTimeBonus); //TODO: Replaxe Spaces with \#  code
            string tbon     = "Time Bonus:  " + iTimeBonus;
            string retry    = "   Retry   ";
            string sumscore = " Result: " + ilevelscore;

            peCoin = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/coin"), true);      // Icon of Coin
            ptCoin = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);      // Text: number of Coins
            ptCoin.AddText(GameConstants.lucidaConsole, "   " + ilevelCoins, Color.White);
            ptScore = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);     // Text: actual Score
            ptScore.AddText(GameConstants.lucidaConsole, score, Color.White);
            ptTimebonus = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true); //Text: actual TimeBonus
            ptTimebonus.AddText(GameConstants.lucidaConsole, tbon, Color.White);
            ptScoreSum = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);  // Text: Result:
            ptScoreSum.AddText(GameConstants.lucidaConsole, sumscore, Color.White);

            pbtRetry = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/button"), true); // Button: retry
            ptRetry  = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
            ptRetry.AddText(GameConstants.lucidaConsole, retry, Color.White);
            ptRetryS = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true); // Button: retry selected
            ptRetryS.AddText(GameConstants.lucidaConsole, retry, Color.OrangeRed);

            //LOADNG THE ELEMENTS
            if (!mustRetry)
            {
                string pay = "Pay $" + (ilevelCoins * 1 / 2);
                ptText     = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/ConfirmText"), true);    // Text: Main-Info Text
                pePictuer  = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/door_0-0_short"), true); // Sprite of Warden or Door
                pbtConfirm = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/button"), true);         // Button: pay fee and go on
                ptConfirm  = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true);
                ptConfirm.AddText(GameConstants.lucidaConsole, pay, Color.White);
                ptConfirmS = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/void"), true); // Button Confirm Selected
                ptConfirmS.AddText(GameConstants.lucidaConsole, pay, Color.OrangeRed);
            }
            else
            {
                ptText    = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/RetryText"), true);         // Text: Main-Info Text
                pePictuer = new PanelElement(GameConstants.Content.Load <Texture2D>("Panels/door_riegel_short"), true); // Sprite of Warden or Door
                pePictuer.AddTexture(GameConstants.Content.Load <Texture2D>("Panels/door_0-0_short"));
            }

            // FILLING THE PANEL
            MainPanel.Add(peCoin, new Vector2(0.07f, 0.1f));
            MainPanel.Add(ptCoin, new Vector2(0.15f, 0.1f));
            MainPanel.Add(ptScore, new Vector2(0.6f, 0.1f));
            MainPanel.Add(ptTimebonus, new Vector2(0.6f, 0.18f));
            MainPanel.Add(ptScoreSum, new Vector2(0.6f, 0.26f));
            MainPanel.Add(ptText, new Vector2(0.45f, 0.3f));
            MainPanel.Add(pePictuer, new Vector2(0.07f, 0.3f));
            MainPanel.Add(pbtRetry, new Vector2(0.6f, 0.75f));
            MainPanel.Add(ptRetry, new Vector2(0.65f, 0.76f));
            MainPanel.Add(ptRetryS, new Vector2(0.65f, 0.76f));
            if (!mustRetry)
            {
                MainPanel.Add(pbtConfirm, new Vector2(0.2f, 0.75f));
                MainPanel.Add(ptConfirm, new Vector2(0.25f, 0.76f));
                MainPanel.Add(ptConfirmS, new Vector2(0.25f, 0.76f));
            }
        }