示例#1
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            switch (displayIndex)
            {
            case 0:
                spriteBatch.Draw(Logo, new Vector2((Singleton.Instance.Diemensions.X - Logo.Width) / 2, (Singleton.Instance.Diemensions.Y - Logo.Height) / 2), _Color);
                break;

            case 1:
                fontSize = Arcanista.MeasureString("proudly   present");
                spriteBatch.DrawString(Arcanista, "proudly   present", new Vector2((Singleton.Instance.Diemensions.X - fontSize.X) / 2, (Singleton.Instance.Diemensions.Y - fontSize.Y) / 2), _Color);
                break;

            case 2:
                fontSize = KM.MeasureString("Egypt Bubble");
                spriteBatch.DrawString(KM, "Egypt Bubble", new Vector2((Singleton.Instance.Diemensions.X - fontSize.X) / 2, (Singleton.Instance.Diemensions.Y - fontSize.Y) / 2), _Color);
                break;

            case 3:
                spriteBatch.Draw(Black, Vector2.Zero, _Color);
                break;
            }
        }
示例#2
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(BG, Vector2.Zero, Color.White);
            // Draw mouse onHover button
            if (mhAbout)
            {
                spriteBatch.Draw(AboutH, new Vector2(1047, 366), Color.White);
            }
            if (mhExit)
            {
                spriteBatch.Draw(ExitH, new Vector2(475, 574), Color.White);
            }
            if (mhOption)
            {
                spriteBatch.Draw(OptionH, new Vector2(98, 362), Color.White);
            }
            if (mhRanking)
            {
                spriteBatch.Draw(RankingH, new Vector2(986, 57), Color.White);
            }
            if (mhStart)
            {
                spriteBatch.Draw(StartH, new Vector2(551, 332), Color.White);
            }
            // Draw UI when is NOT MainMenu
            if (!mainScreen)
            {
                spriteBatch.Draw(Black, Vector2.Zero, new Color(255, 255, 255, 210));
                if (mhBack)
                {
                    spriteBatch.Draw(back, new Vector2(1230 - back.Width, 50), Color.OrangeRed);
                }
                else
                {
                    spriteBatch.Draw(back, new Vector2(1230 - back.Width, 50), Color.White);
                }
                // Draw Option Screen
                if (showOption)
                {
                    fontSize = KM.MeasureString("Option");
                    spriteBatch.DrawString(KM, "Option", new Vector2(Singleton.Instance.Diemensions.X / 2 - fontSize.X / 2, 125), Color.White);

                    spriteBatch.DrawString(Arcanista, "BGM Volume", new Vector2(300, 250), Color.White);
                    spriteBatch.Draw(Arrow, new Vector2(700, 240), null, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.FlipHorizontally, 0f);
                    spriteBatch.DrawString(Arcanista, MasterBGM.ToString(), new Vector2(800, 250), Color.White);
                    spriteBatch.Draw(Arrow, new Vector2(900, 240), Color.White);

                    spriteBatch.DrawString(Arcanista, "SFX Volume", new Vector2(300, 325), Color.White);
                    spriteBatch.Draw(Arrow, new Vector2(700, 315), null, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.FlipHorizontally, 0f);
                    spriteBatch.DrawString(Arcanista, MasterSFX.ToString(), new Vector2(800, 325), Color.White);
                    spriteBatch.Draw(Arrow, new Vector2(900, 315), Color.White);

                    spriteBatch.DrawString(Arcanista, "Full Screen", new Vector2(300, 425), Color.White);
                    if (!FullScreen)
                    {
                        spriteBatch.Draw(checkBoxNo, new Vector2(800, 425), Color.White);
                    }
                    else
                    {
                        spriteBatch.Draw(checkBoxYes, new Vector2(800, 425), Color.White);
                    }

                    spriteBatch.DrawString(Arcanista, "Show FPS", new Vector2(300, 500), Color.White);
                    if (!ShowFPS)
                    {
                        spriteBatch.Draw(checkBoxNo, new Vector2(800, 500), Color.White);
                    }
                    else
                    {
                        spriteBatch.Draw(checkBoxYes, new Vector2(800, 500), Color.White);
                    }

                    if (mhApply)
                    {
                        spriteBatch.Draw(apply, new Vector2(1100 - back.Width, 625), Color.OrangeRed);
                    }
                    else
                    {
                        spriteBatch.Draw(apply, new Vector2(1100 - back.Width, 625), Color.White);
                    }
                }
                // Draw About Screen
                if (showAbout)
                {
                    fontSize = KM.MeasureString("About");
                    spriteBatch.DrawString(KM, "About", new Vector2(Singleton.Instance.Diemensions.X / 2 - fontSize.X / 2, 125), Color.White);

                    spriteBatch.DrawString(Arcanista, "Graphics", new Vector2(200, 250), Color.NavajoWhite);
                    spriteBatch.DrawString(Arcanista, "- We create", new Vector2(160, 350), Color.White);
                    spriteBatch.DrawString(Arcanista, "All Graphics", new Vector2(150, 425), Color.White);

                    spriteBatch.DrawString(Arcanista, "Audios", new Vector2(600, 250), Color.NavajoWhite);
                    spriteBatch.DrawString(Arcanista, "- www.sonniss.com", new Vector2(520, 350), Color.White);
                    spriteBatch.DrawString(Arcanista, "Free Audios Bundle", new Vector2(510, 425), Color.White);

                    spriteBatch.DrawString(Arcanista, "Fonts", new Vector2(1000, 250), Color.NavajoWhite);
                    spriteBatch.DrawString(Arcanista, "- Arial", new Vector2(985, 350), Color.White);
                    spriteBatch.DrawString(Arcanista, "- Arcanista", new Vector2(950, 425), Color.White);
                    spriteBatch.DrawString(Arcanista, "- KH-Metropolis", new Vector2(920, 500), Color.White);

                    spriteBatch.DrawString(Arial, "FPS Counter Script : https://stackoverflow.com/questions/20676185", new Vector2(50, 630), Color.White);
                    spriteBatch.DrawString(Arial, "/xna-monogame-getting-the-frames-per-second", new Vector2(350, 660), Color.White);
                }
                // Draw Leader board Screen
                if (showRanking)
                {
                    fontSize = KM.MeasureString("Ranking");
                    spriteBatch.DrawString(KM, "Ranking", new Vector2(Singleton.Instance.Diemensions.X / 2 - fontSize.X / 2, 125), Color.White);

                    if (Singleton.Instance.BestTime != null)
                    {
                        fontSize = Arcanista.MeasureString("Best Time : " + Singleton.Instance.BestTime);
                        spriteBatch.DrawString(Arcanista, "Best Time : " + Singleton.Instance.BestTime, new Vector2(Singleton.Instance.Diemensions.X / 2 - fontSize.X / 2, 350), Color.White);
                        fontSize = Arcanista.MeasureString("Best Score : " + Singleton.Instance.BestScore);
                        spriteBatch.DrawString(Arcanista, "Best Score : " + Singleton.Instance.BestScore, new Vector2(Singleton.Instance.Diemensions.X / 2 - fontSize.X / 2, 425), Color.White);
                    }
                    else
                    {
                        fontSize = Arcanista.MeasureString("No Infomation");
                        spriteBatch.DrawString(Arcanista, "No Infomation", new Vector2(Singleton.Instance.Diemensions.X / 2 - fontSize.X / 2, 350), Color.White);
                    }
                }
            }
            // Draw fade out
            if (!fadeFinish)
            {
                spriteBatch.Draw(Black, Vector2.Zero, _Color);
            }
        }