Esempio n. 1
0
        public override void LoadContent()
        {
            _introLogo = FingerGames.Instance.Content.Load <Texture2D>(@"Textures\IntroLogo");
            _pixel     = FingerGames.Instance.Content.Load <Texture2D>(@"Textures\pixel");
            _font      = FingerGames.Instance.Content.Load <SpriteFont>(@"Fonts\MenuFont");

            _introImage            = new XnaImage(_introLogo, new Rectangle(800 - _introLogo.Width, 480 - _introLogo.Height, _introLogo.Width, _introLogo.Height));
            _introImage.BlendColor = new Color(60, 60, 60);

            VerticalStackPanel panel = new VerticalStackPanel();

            panel.HorizontalAlignment = HorizontalAlignment.Center;
            panel.Bounds = new Rectangle(10, 100, 780, 300);

            XnaLabel trialLabel1 = new XnaLabel(new Rectangle(0, 0, 800, 40));

            trialLabel1.Font     = _font;
            trialLabel1.FontZoom = 0.6f;
            trialLabel1.Text     = "You are running the trial version of Fantastic Finger Fun.";

            XnaLabel trialLabel2 = new XnaLabel(new Rectangle(0, 0, 800, 40));

            trialLabel2.Font     = _font;
            trialLabel2.FontZoom = 0.6f;
            trialLabel2.Text     = "The full version unlocks more race tracks,";

            XnaLabel trialLabel3 = new XnaLabel(new Rectangle(0, 0, 800, 40));

            trialLabel3.Font     = _font;
            trialLabel3.FontZoom = 0.6f;
            trialLabel3.Text     = "game modes, and challenges. To continue using";

            XnaLabel trialLabel4 = new XnaLabel(new Rectangle(0, 0, 800, 40));

            trialLabel4.Font     = _font;
            trialLabel4.FontZoom = 0.6f;
            trialLabel4.Text     = "the Trial mode, click the back button.";

            panel.AddChild(trialLabel1);
            panel.AddChild(trialLabel2);
            panel.AddChild(trialLabel3);
            panel.AddChild(trialLabel4);

            XnaButton purchaseButton = new XnaButton(new Rectangle(0, 400, 800, 80));

            purchaseButton.BorderWidth         = 0;
            purchaseButton.FontZoom            = 0.8f;
            purchaseButton.HorizontalAlignment = HorizontalAlignment.Center;
            purchaseButton.Text   = "Click Here To Purchase Fantastic Finger Fun...";
            purchaseButton.Font   = _font;
            purchaseButton.Click += new EventHandler(purchaseButton_Click);

            this.Children.Add(_introImage);
            this.Children.Add(panel);
            this.Children.Add(purchaseButton);

            base.LoadContent();
        }
Esempio n. 2
0
        public override void LoadContent()
        {
            SpriteFont font = FingerGames.Instance.Content.Load <SpriteFont>(@"Fonts\MenuFont");

            HorizontalStackPanel horizontalPanel = new HorizontalStackPanel();

            horizontalPanel.VerticalAlignment = VerticalAlignment.Top;
            horizontalPanel.FixedSize         = false;
            horizontalPanel.Bounds            = new Rectangle(0, 0, 800, 480);
            horizontalPanel.Padding           = new Rectangle(10, 10, 10, 10);

            foreach (BaseGame game in new BaseGame[] { new Games.FingerRacerGame(FingerGames.Instance.GameManager), new Games.FingerRunnerGame(FingerGames.Instance.GameManager), new Games.FingerTwisterGame(FingerGames.Instance.GameManager) })
            {
                _games.Add(game);

                game.LoadContent();
                XnaImageButton imageButton = new XnaImageButton(game.Logo, new Rectangle(5, 5, 240, 240));
                imageButton.Tag       = game;
                imageButton.BackColor = Color.Gray;
                imageButton.Click    += new EventHandler(imageButton_Click);

                XnaButton textButton = new XnaButton(new Rectangle(5, 5, 240, 60));
                textButton.BorderWidth = 0;
                textButton.BackColor   = Color.Transparent;
                textButton.Text        = game.Title;
                textButton.Font        = font;
                textButton.Tag         = game;
                textButton.Click      += new EventHandler(imageButton_Click);

                VerticalStackPanel panel = new VerticalStackPanel();
                panel.Bounds = new Rectangle(0, 0, 240, 0);
                panel.HorizontalAlignment = HorizontalAlignment.Center;
                panel.AddChild(imageButton);
                panel.AddChild(textButton);

                horizontalPanel.AddChild(panel);
            }

            VerticalStackPanel vertPanel = new VerticalStackPanel();

            vertPanel.Bounds = new Rectangle(0, 0, 800, 0);
            vertPanel.HorizontalAlignment = HorizontalAlignment.Center;
            vertPanel.AddChild(horizontalPanel);

            XnaButton playAllText = new XnaButton(new Rectangle(0, 480 - 60, 800, 60));

            playAllText.BorderWidth = 0;
            playAllText.BackColor   = Color.Transparent;
            playAllText.Text        = "Play All Games";
            playAllText.Font        = font;
            playAllText.Tag         = null;
            playAllText.Click      += new EventHandler(imageButton_Click);

            this.Children.Add(vertPanel);
            this.Children.Add(playAllText);

            base.LoadContent();
        }
Esempio n. 3
0
        public override void LoadContent()
        {
            SpriteFont font = FingerGames.Instance.Content.Load<SpriteFont>(@"Fonts\MenuFont");

            HorizontalStackPanel horizontalPanel = new HorizontalStackPanel();
            horizontalPanel.VerticalAlignment = VerticalAlignment.Top;
            horizontalPanel.FixedSize = false;
            horizontalPanel.Bounds = new Rectangle(0, 0, 800, 480);
            horizontalPanel.Padding = new Rectangle(10, 10, 10, 10);

            foreach (BaseGame game in new BaseGame[] { new Games.FingerRacerGame(FingerGames.Instance.GameManager), new Games.FingerRunnerGame(FingerGames.Instance.GameManager), new Games.FingerTwisterGame(FingerGames.Instance.GameManager) })
            {
                _games.Add(game);

                game.LoadContent();
                XnaImageButton imageButton = new XnaImageButton(game.Logo, new Rectangle(5, 5, 240, 240));
                imageButton.Tag = game;
                imageButton.BackColor = Color.Gray;
                imageButton.Click += new EventHandler(imageButton_Click);

                XnaButton textButton = new XnaButton(new Rectangle(5, 5, 240, 60));
                textButton.BorderWidth = 0;
                textButton.BackColor = Color.Transparent;
                textButton.Text = game.Title;
                textButton.Font = font;
                textButton.Tag = game;
                textButton.Click += new EventHandler(imageButton_Click);

                VerticalStackPanel panel = new VerticalStackPanel();
                panel.Bounds = new Rectangle(0, 0, 240, 0);
                panel.HorizontalAlignment = HorizontalAlignment.Center;
                panel.AddChild(imageButton);
                panel.AddChild(textButton);

                horizontalPanel.AddChild(panel);
            }

            VerticalStackPanel vertPanel = new VerticalStackPanel();
            vertPanel.Bounds = new Rectangle(0, 0, 800, 0);
            vertPanel.HorizontalAlignment = HorizontalAlignment.Center;
            vertPanel.AddChild(horizontalPanel);

            XnaButton playAllText = new XnaButton(new Rectangle(0, 480 - 60, 800, 60));
            playAllText.BorderWidth = 0;
            playAllText.BackColor = Color.Transparent;
            playAllText.Text = "Play All Games";
            playAllText.Font = font;
            playAllText.Tag = null;
            playAllText.Click += new EventHandler(imageButton_Click);

            this.Children.Add(vertPanel);
            this.Children.Add(playAllText);

            base.LoadContent();
        }
Esempio n. 4
0
        public override void LoadContent()
        {
            _introLogo = FingerGames.Instance.Content.Load<Texture2D>(@"Textures\IntroLogo");
            _pixel = FingerGames.Instance.Content.Load<Texture2D>(@"Textures\pixel");
            _font = FingerGames.Instance.Content.Load<SpriteFont>(@"Fonts\MenuFont");

            _introImage = new XnaImage(_introLogo, new Rectangle(800 - _introLogo.Width, 480 - _introLogo.Height, _introLogo.Width, _introLogo.Height));
            _introImage.BlendColor = new Color(60,60,60);

            VerticalStackPanel panel = new VerticalStackPanel();
            panel.HorizontalAlignment = HorizontalAlignment.Center;
            panel.Bounds = new Rectangle(10, 100, 780, 300);

            XnaLabel trialLabel1 = new XnaLabel(new Rectangle(0, 0, 800, 40));
            trialLabel1.Font = _font;
            trialLabel1.FontZoom = 0.6f;
            trialLabel1.Text = "You are running the trial version of Fantastic Finger Fun.";

            XnaLabel trialLabel2 = new XnaLabel(new Rectangle(0, 0, 800, 40));
            trialLabel2.Font = _font;
            trialLabel2.FontZoom = 0.6f;
            trialLabel2.Text = "The full version unlocks more race tracks,";

            XnaLabel trialLabel3 = new XnaLabel(new Rectangle(0, 0, 800, 40));
            trialLabel3.Font = _font;
            trialLabel3.FontZoom = 0.6f;
            trialLabel3.Text = "game modes, and challenges. To continue using";

            XnaLabel trialLabel4 = new XnaLabel(new Rectangle(0, 0, 800, 40));
            trialLabel4.Font = _font;
            trialLabel4.FontZoom = 0.6f;
            trialLabel4.Text = "the Trial mode, click the back button.";

            panel.AddChild(trialLabel1);
            panel.AddChild(trialLabel2);
            panel.AddChild(trialLabel3);
            panel.AddChild(trialLabel4);

            XnaButton purchaseButton = new XnaButton(new Rectangle(0, 400, 800, 80));
            purchaseButton.BorderWidth = 0;
            purchaseButton.FontZoom = 0.8f;
            purchaseButton.HorizontalAlignment = HorizontalAlignment.Center;
            purchaseButton.Text = "Click Here To Purchase Fantastic Finger Fun...";
            purchaseButton.Font = _font;
            purchaseButton.Click += new EventHandler(purchaseButton_Click);

            this.Children.Add(_introImage);
            this.Children.Add(panel);
            this.Children.Add(purchaseButton);

            base.LoadContent();
        }
Esempio n. 5
0
        public override void LoadContent()
        {
            _introLogo  = FingerGames.Instance.Content.Load <Texture2D>(@"Textures\IntroLogo");
            _introTitle = FingerGames.Instance.Content.Load <Texture2D>(@"Textures\IntroTitle");
            _font       = FingerGames.Instance.Content.Load <SpriteFont>(@"Fonts\MenuFont");

            this.Assets.Add(_introLogo);
            this.Assets.Add(_introTitle);

            _introImage = new XnaImage(_introLogo, new Rectangle(800 - _introLogo.Width, 480 - _introLogo.Height, _introLogo.Width, _introLogo.Height));
            this.Children.Add(_introImage);

            XnaImage titleImage = new XnaImage(_introTitle, new Rectangle(400 - _introTitle.Width / 2, 5, _introTitle.Width, _introTitle.Height));

            this.Children.Add(titleImage);

            VerticalStackPanel panel = new VerticalStackPanel();

            panel.HorizontalAlignment = HorizontalAlignment.Left;
            panel.Bounds = new Rectangle(titleImage.Bounds.X, 90, 100, 400);

            XnaButton singlePlayerButton = new XnaButton(new Rectangle(0, 0, 310, 54));

            singlePlayerButton.BorderWidth         = 0;
            singlePlayerButton.HorizontalAlignment = HorizontalAlignment.Left;
            singlePlayerButton.Text      = "Single Player";
            singlePlayerButton.Font      = _font;
            singlePlayerButton.BackColor = Color.Transparent;
            singlePlayerButton.Click    += new EventHandler(singlePlayerButton_Click);

            XnaButton multiPlayerButton = new XnaButton(new Rectangle(0, 0, 310, 54));

            multiPlayerButton.BorderWidth         = 0;
            multiPlayerButton.HorizontalAlignment = HorizontalAlignment.Left;
            multiPlayerButton.Text      = "Two Player";
            multiPlayerButton.Font      = _font;
            multiPlayerButton.BackColor = Color.Transparent;
            multiPlayerButton.Click    += new EventHandler(multiPlayerButton_Click);

            XnaButton soundToggle = new XnaButton(new Rectangle(0, 0, 310, 54));

            soundToggle.Tag                 = !Settings.Instance.SoundsEnabled;
            soundToggle.BorderWidth         = 0;
            soundToggle.HorizontalAlignment = HorizontalAlignment.Left;
            soundToggle.Font                = _font;
            soundToggle.BackColor           = Color.Transparent;
            soundToggle.Click              += new EventHandler(soundToggle_SelectionChanged);
            soundToggle_SelectionChanged(soundToggle, null);

            XnaButton fingerArrowToggle = new XnaButton(new Rectangle(0, 0, 310, 54));

            fingerArrowToggle.Tag                 = !Settings.Instance.ArrowsEnabled;
            fingerArrowToggle.BorderWidth         = 0;
            fingerArrowToggle.HorizontalAlignment = HorizontalAlignment.Left;
            fingerArrowToggle.Font                = _font;
            fingerArrowToggle.BackColor           = Color.Transparent;
            fingerArrowToggle.Click              += new EventHandler(fingerArrowToggle_SelectionChanged);
            fingerArrowToggle_SelectionChanged(fingerArrowToggle, null);

            panel.AddChild(singlePlayerButton);
            panel.AddChild(multiPlayerButton);
            panel.AddChild(fingerArrowToggle);
            panel.AddChild(soundToggle);

            XnaButton exitButton = new XnaButton(new Rectangle(titleImage.Bounds.Right - 310, 480 - 64, 310, 64));

            exitButton.BorderWidth         = 0;
            exitButton.HorizontalAlignment = HorizontalAlignment.Right;
            exitButton.Text      = "Exit";
            exitButton.Font      = _font;
            exitButton.BackColor = Color.Transparent;
            exitButton.Click    += new EventHandler(exitButton_Click);

            XnaButton helpButton = new XnaButton(new Rectangle(titleImage.Bounds.X, 480 - 64, 310, 64));

            helpButton.BorderWidth         = 0;
            helpButton.HorizontalAlignment = HorizontalAlignment.Left;
            helpButton.Text      = "Help";
            helpButton.Font      = _font;
            helpButton.BackColor = Color.Transparent;
            helpButton.Click    += new EventHandler(helpButton_Click);

            this.Children.Add(panel);
            this.Children.Add(exitButton);
            this.Children.Add(helpButton);

            base.LoadContent();
        }
Esempio n. 6
0
        public override void LoadContent()
        {
            _introLogo = FingerGames.Instance.Content.Load<Texture2D>(@"Textures\IntroLogo");
            _introTitle = FingerGames.Instance.Content.Load<Texture2D>(@"Textures\IntroTitle");
            _font = FingerGames.Instance.Content.Load<SpriteFont>(@"Fonts\MenuFont");

            this.Assets.Add(_introLogo);
            this.Assets.Add(_introTitle);

            _introImage = new XnaImage(_introLogo, new Rectangle(800 - _introLogo.Width, 480 - _introLogo.Height, _introLogo.Width, _introLogo.Height));
            this.Children.Add(_introImage);

            XnaImage titleImage = new XnaImage(_introTitle, new Rectangle(400 - _introTitle.Width / 2, 5, _introTitle.Width, _introTitle.Height));
            this.Children.Add(titleImage);

            VerticalStackPanel panel = new VerticalStackPanel();
            panel.HorizontalAlignment = HorizontalAlignment.Left;
            panel.Bounds = new Rectangle(titleImage.Bounds.X, 90, 100, 400);

            XnaButton singlePlayerButton = new XnaButton(new Rectangle(0, 0, 310, 54));
            singlePlayerButton.BorderWidth = 0;
            singlePlayerButton.HorizontalAlignment = HorizontalAlignment.Left;
            singlePlayerButton.Text = "Single Player";
            singlePlayerButton.Font = _font;
            singlePlayerButton.BackColor = Color.Transparent;
            singlePlayerButton.Click += new EventHandler(singlePlayerButton_Click);

            XnaButton multiPlayerButton = new XnaButton(new Rectangle(0, 0, 310, 54));
            multiPlayerButton.BorderWidth = 0;
            multiPlayerButton.HorizontalAlignment = HorizontalAlignment.Left;
            multiPlayerButton.Text = "Two Player";
            multiPlayerButton.Font = _font;
            multiPlayerButton.BackColor = Color.Transparent;
            multiPlayerButton.Click += new EventHandler(multiPlayerButton_Click);

            XnaButton soundToggle = new XnaButton(new Rectangle(0, 0, 310, 54));
            soundToggle.Tag = !Settings.Instance.SoundsEnabled;
            soundToggle.BorderWidth = 0;
            soundToggle.HorizontalAlignment = HorizontalAlignment.Left;
            soundToggle.Font = _font;
            soundToggle.BackColor = Color.Transparent;
            soundToggle.Click += new EventHandler(soundToggle_SelectionChanged);
            soundToggle_SelectionChanged(soundToggle, null);

            XnaButton fingerArrowToggle = new XnaButton(new Rectangle(0, 0, 310, 54));
            fingerArrowToggle.Tag = !Settings.Instance.ArrowsEnabled;
            fingerArrowToggle.BorderWidth = 0;
            fingerArrowToggle.HorizontalAlignment = HorizontalAlignment.Left;
            fingerArrowToggle.Font = _font;
            fingerArrowToggle.BackColor = Color.Transparent;
            fingerArrowToggle.Click += new EventHandler(fingerArrowToggle_SelectionChanged);
            fingerArrowToggle_SelectionChanged(fingerArrowToggle, null);

            panel.AddChild(singlePlayerButton);
            panel.AddChild(multiPlayerButton);
            panel.AddChild(fingerArrowToggle);
            panel.AddChild(soundToggle);

            XnaButton exitButton = new XnaButton(new Rectangle(titleImage.Bounds.Right - 310, 480 - 64, 310, 64));
            exitButton.BorderWidth = 0;
            exitButton.HorizontalAlignment = HorizontalAlignment.Right;
            exitButton.Text = "Exit";
            exitButton.Font = _font;
            exitButton.BackColor = Color.Transparent;
            exitButton.Click += new EventHandler(exitButton_Click);

            XnaButton helpButton = new XnaButton(new Rectangle(titleImage.Bounds.X, 480 - 64, 310, 64));
            helpButton.BorderWidth = 0;
            helpButton.HorizontalAlignment = HorizontalAlignment.Left;
            helpButton.Text = "Help";
            helpButton.Font = _font;
            helpButton.BackColor = Color.Transparent;
            helpButton.Click += new EventHandler(helpButton_Click);

            this.Children.Add(panel);
            this.Children.Add(exitButton);
            this.Children.Add(helpButton);

            base.LoadContent();
        }
Esempio n. 7
0
        public XnaScoreCenter()
        {
            if (null == _menuFont)
            {
                _menuFont = FingerGames.Instance.Content.Load <SpriteFont>(@"Fonts\MenuFont");
            }

            _continueButton        = new XnaButton(new Rectangle(0, 400, 800, 80));
            _continueButton.Text   = "Tap Here to Continue...";
            _continueButton.Click += new EventHandler(_continueButton_Click);

            _horizontalScorePanel = new HorizontalStackPanel();
            _horizontalScorePanel.VerticalAlignment = VerticalAlignment.Top;
            _horizontalScorePanel.Bounds            = new Rectangle(0, 0, 800, 400);
            _horizontalScorePanel.Padding           = new Rectangle(0, 0, 0, 0);

            _nameScorePanel = new VerticalStackPanel();
            _nameScorePanel.HorizontalAlignment = HorizontalAlignment.Left;
            _nameScorePanel.FixedSize           = true;
            _nameScorePanel.Bounds      = new Rectangle(0, 0, 300, 400);
            _nameScorePanel.BorderColor = Color.White;
            _nameScorePanel.BorderWidth = 1;

            _scoreScorePanel             = new VerticalStackPanel();
            _scoreScorePanel.FixedSize   = true;
            _scoreScorePanel.Bounds      = new Rectangle(0, 0, 250, 400);
            _scoreScorePanel.BorderColor = Color.White;
            _scoreScorePanel.BorderWidth = 1;

            _totalScorePanel             = new VerticalStackPanel();
            _totalScorePanel.FixedSize   = true;
            _totalScorePanel.Bounds      = new Rectangle(0, 0, 250, 400);
            _totalScorePanel.BorderColor = Color.White;
            _totalScorePanel.BorderWidth = 1;

            XnaLabel nameLabel = new XnaButton(new Rectangle(0, 0, 300, 70));

            nameLabel.Text                = "Name";
            nameLabel.FontZoom            = 1.25f;
            nameLabel.Font                = _menuFont;
            nameLabel.HorizontalAlignment = HorizontalAlignment.Left;

            _nameScorePanel.AddChild(nameLabel);

            _scoreLabel                     = new XnaButton(new Rectangle(0, 0, 250, 70));
            _scoreLabel.Text                = "Score";
            _scoreLabel.FontZoom            = 1.25f;
            _scoreLabel.Font                = _menuFont;
            _scoreLabel.HorizontalAlignment = HorizontalAlignment.Center;

            _scoreScorePanel.AddChild(_scoreLabel);

            _totalLabel                     = new XnaButton(new Rectangle(0, 0, 250, 70));
            _totalLabel.Text                = "Overall";
            _totalLabel.FontZoom            = 1.25f;
            _totalLabel.Font                = _menuFont;
            _totalLabel.HorizontalAlignment = HorizontalAlignment.Center;

            _totalScorePanel.AddChild(_totalLabel);

            _horizontalScorePanel.AddChild(_nameScorePanel);
            _horizontalScorePanel.AddChild(_scoreScorePanel);
            _horizontalScorePanel.AddChild(_totalScorePanel);

            _scorePanel           = new VerticalStackPanel();
            _scorePanel.Bounds    = new Rectangle(0, 0, 800, 480);
            _scorePanel.FixedSize = true;

            _scorePanel.AddChild(_horizontalScorePanel);
            _scorePanel.AddChild(_continueButton);

            _loadingLabel      = new XnaLabel(new Rectangle(0, 0, 800, 480));
            _loadingLabel.Text = "Loading...";

            _continueButton.Click += new EventHandler(_continueButton_Click);
        }
Esempio n. 8
0
        public XnaScoreCenter()
        {
            if (null == _menuFont)
            {
                _menuFont = FingerGames.Instance.Content.Load<SpriteFont>(@"Fonts\MenuFont");
            }

            _continueButton = new XnaButton(new Rectangle(0, 400, 800, 80));
            _continueButton.Text = "Tap Here to Continue...";
            _continueButton.Click += new EventHandler(_continueButton_Click);

            _horizontalScorePanel = new HorizontalStackPanel();
            _horizontalScorePanel.VerticalAlignment = VerticalAlignment.Top;
            _horizontalScorePanel.Bounds = new Rectangle(0, 0, 800, 400);
            _horizontalScorePanel.Padding = new Rectangle(0, 0, 0, 0);

            _nameScorePanel = new VerticalStackPanel();
            _nameScorePanel.HorizontalAlignment = HorizontalAlignment.Left;
            _nameScorePanel.FixedSize = true;
            _nameScorePanel.Bounds = new Rectangle(0, 0, 300, 400);
            _nameScorePanel.BorderColor = Color.White;
            _nameScorePanel.BorderWidth = 1;

            _scoreScorePanel = new VerticalStackPanel();
            _scoreScorePanel.FixedSize = true;
            _scoreScorePanel.Bounds = new Rectangle(0, 0, 250, 400);
            _scoreScorePanel.BorderColor = Color.White;
            _scoreScorePanel.BorderWidth = 1;

            _totalScorePanel = new VerticalStackPanel();
            _totalScorePanel.FixedSize = true;
            _totalScorePanel.Bounds = new Rectangle(0, 0, 250, 400);
            _totalScorePanel.BorderColor = Color.White;
            _totalScorePanel.BorderWidth = 1;

            XnaLabel nameLabel = new XnaButton(new Rectangle(0, 0, 300, 70));
            nameLabel.Text = "Name";
            nameLabel.FontZoom = 1.25f;
            nameLabel.Font = _menuFont;
            nameLabel.HorizontalAlignment = HorizontalAlignment.Left;

            _nameScorePanel.AddChild(nameLabel);

            _scoreLabel = new XnaButton(new Rectangle(0, 0, 250, 70));
            _scoreLabel.Text = "Score";
            _scoreLabel.FontZoom = 1.25f;
            _scoreLabel.Font = _menuFont;
            _scoreLabel.HorizontalAlignment = HorizontalAlignment.Center;

            _scoreScorePanel.AddChild(_scoreLabel);

            _totalLabel = new XnaButton(new Rectangle(0, 0, 250, 70));
            _totalLabel.Text = "Overall";
            _totalLabel.FontZoom = 1.25f;
            _totalLabel.Font = _menuFont;
            _totalLabel.HorizontalAlignment = HorizontalAlignment.Center;

            _totalScorePanel.AddChild(_totalLabel);

            _horizontalScorePanel.AddChild(_nameScorePanel);
            _horizontalScorePanel.AddChild(_scoreScorePanel);
            _horizontalScorePanel.AddChild(_totalScorePanel);

            _scorePanel = new VerticalStackPanel();
            _scorePanel.Bounds = new Rectangle(0, 0, 800, 480);
            _scorePanel.FixedSize = true;

            _scorePanel.AddChild(_horizontalScorePanel);
            _scorePanel.AddChild(_continueButton);

            _loadingLabel = new XnaLabel(new Rectangle(0, 0, 800, 480));
            _loadingLabel.Text = "Loading...";

            _continueButton.Click += new EventHandler(_continueButton_Click);
        }
Esempio n. 9
0
        public override void LoadContent()
        {
            _introLogo = FingerGames.Instance.Content.Load<Texture2D>(@"Textures\IntroLogo");
            _pixel = FingerGames.Instance.Content.Load<Texture2D>(@"Textures\pixel");
            _font = FingerGames.Instance.Content.Load<SpriteFont>(@"Fonts\MenuFont");

            this.Assets.Add(_introLogo);
            this.Assets.Add(_pixel);

            _introImage = new XnaImage(_introLogo, new Rectangle(800 - _introLogo.Width, 480 - _introLogo.Height, _introLogo.Width, _introLogo.Height));
            _introImage.BlendColor = new Color(60,60,60);

            VerticalStackPanel panel = new VerticalStackPanel();
            panel.Padding = new Rectangle(0, 0, 0, 0);
            panel.HorizontalAlignment = HorizontalAlignment.Left;
            panel.Bounds = new Rectangle(10, 10, 780, 470);

            Dictionary<string, string> helpSupport = new Dictionary<string, string>();
            helpSupport.Add("Racer", "Get the fastest time by using your finger to drag your car around the track. The car will follow your finger, unless your finger leaves the track.");
            helpSupport.Add("Runner", "Alternate tapping your fingers in each darkened box to propel the runner. Jump the hurdles by removing both fingers from the screen as the hurdle crosses the bottom of the screen.");
            helpSupport.Add("Twister", "Start by placing a different finger on the pusling circles. You must then move the indicated finger to the new pulsing circle. The first player to pick up a pinned finger loses.");

            foreach (string game in helpSupport.Keys)
            {
                XnaLabel gameNameLabel = new XnaLabel(new Rectangle(10, 0, 780, 48));
                gameNameLabel.HorizontalAlignment = HorizontalAlignment.Left;
                gameNameLabel.VerticalAlignment = VerticalAlignment.Middle;
                gameNameLabel.Font = _font;
                gameNameLabel.FontZoom = 1.0f;
                gameNameLabel.Text = game;
                panel.AddChild(gameNameLabel);

                List<string> segments = new List<string>();

                string newWord = "";
                foreach (string word in helpSupport[game].Split(' '))
                {
                    if (_font.MeasureString(newWord + " " + word).X * .6 < 750)
                    {
                        newWord += " " + word;
                    }
                    else
                    {
                        XnaLabel helpLabel = new XnaLabel(new Rectangle(0, 0, 800, 28));
                        helpLabel.HorizontalAlignment = HorizontalAlignment.Left;
                        helpLabel.VerticalAlignment = VerticalAlignment.Top;
                        helpLabel.Font = _font;
                        helpLabel.FontZoom = 0.6f;
                        helpLabel.Text = newWord.Trim();
                        panel.AddChild(helpLabel);

                        newWord = word;
                    }
                }

                if (newWord.Length > 0)
                {
                    XnaLabel helpLabel = new XnaLabel(new Rectangle(0, 0, 800, 30));
                    helpLabel.HorizontalAlignment = HorizontalAlignment.Left;
                    helpLabel.VerticalAlignment = VerticalAlignment.Top;
                    helpLabel.Font = _font;
                    helpLabel.FontZoom = 0.6f;
                    helpLabel.Text = newWord.Trim();
                    panel.AddChild(helpLabel);
                }
            }

            this.Children.Add(_introImage);
            this.Children.Add(panel);

            base.LoadContent();
        }
Esempio n. 10
0
        public override void LoadContent()
        {
            _introLogo = FingerGames.Instance.Content.Load <Texture2D>(@"Textures\IntroLogo");
            _pixel     = FingerGames.Instance.Content.Load <Texture2D>(@"Textures\pixel");
            _font      = FingerGames.Instance.Content.Load <SpriteFont>(@"Fonts\MenuFont");

            this.Assets.Add(_introLogo);
            this.Assets.Add(_pixel);

            _introImage            = new XnaImage(_introLogo, new Rectangle(800 - _introLogo.Width, 480 - _introLogo.Height, _introLogo.Width, _introLogo.Height));
            _introImage.BlendColor = new Color(60, 60, 60);

            VerticalStackPanel panel = new VerticalStackPanel();

            panel.Padding             = new Rectangle(0, 0, 0, 0);
            panel.HorizontalAlignment = HorizontalAlignment.Left;
            panel.Bounds = new Rectangle(10, 10, 780, 470);

            Dictionary <string, string> helpSupport = new Dictionary <string, string>();

            helpSupport.Add("Racer", "Get the fastest time by using your finger to drag your car around the track. The car will follow your finger, unless your finger leaves the track.");
            helpSupport.Add("Runner", "Alternate tapping your fingers in each darkened box to propel the runner. Jump the hurdles by removing both fingers from the screen as the hurdle crosses the bottom of the screen.");
            helpSupport.Add("Twister", "Start by placing a different finger on the pusling circles. You must then move the indicated finger to the new pulsing circle. The first player to pick up a pinned finger loses.");

            foreach (string game in helpSupport.Keys)
            {
                XnaLabel gameNameLabel = new XnaLabel(new Rectangle(10, 0, 780, 48));
                gameNameLabel.HorizontalAlignment = HorizontalAlignment.Left;
                gameNameLabel.VerticalAlignment   = VerticalAlignment.Middle;
                gameNameLabel.Font     = _font;
                gameNameLabel.FontZoom = 1.0f;
                gameNameLabel.Text     = game;
                panel.AddChild(gameNameLabel);

                List <string> segments = new List <string>();

                string newWord = "";
                foreach (string word in helpSupport[game].Split(' '))
                {
                    if (_font.MeasureString(newWord + " " + word).X * .6 < 750)
                    {
                        newWord += " " + word;
                    }
                    else
                    {
                        XnaLabel helpLabel = new XnaLabel(new Rectangle(0, 0, 800, 28));
                        helpLabel.HorizontalAlignment = HorizontalAlignment.Left;
                        helpLabel.VerticalAlignment   = VerticalAlignment.Top;
                        helpLabel.Font     = _font;
                        helpLabel.FontZoom = 0.6f;
                        helpLabel.Text     = newWord.Trim();
                        panel.AddChild(helpLabel);

                        newWord = word;
                    }
                }

                if (newWord.Length > 0)
                {
                    XnaLabel helpLabel = new XnaLabel(new Rectangle(0, 0, 800, 30));
                    helpLabel.HorizontalAlignment = HorizontalAlignment.Left;
                    helpLabel.VerticalAlignment   = VerticalAlignment.Top;
                    helpLabel.Font     = _font;
                    helpLabel.FontZoom = 0.6f;
                    helpLabel.Text     = newWord.Trim();
                    panel.AddChild(helpLabel);
                }
            }

            this.Children.Add(_introImage);
            this.Children.Add(panel);

            base.LoadContent();
        }