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()
        {
            _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. 3
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. 4
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. 5
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. 6
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();
        }