Ejemplo n.º 1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public VencedorScreen()
        {
            //TransitionOnTime = TimeSpan.FromSeconds(1.5);
            //TransitionOffTime = TimeSpan.FromSeconds(0.5);

            againButton = new Button("Again");
            againButton.Tapped += new EventHandler<EventArgs>(playButton_Tapped);
            //menuButtons.Add(playButton);

            EnabledGestures = GestureType.Tap;
        }
        public PhoneMainMenuScreen()
            : base("Main Menu")
        {
            Temp.IsHome = true;
            // Create a button to start the game
            Button playButton = new Button("Play");
            playButton.Tapped += playButton_Tapped;
            MenuButtons.Add(playButton);

            // Create two buttons to toggle sound effects and music. This sample just shows one way
            // of making and using these buttons; it doesn't actually have sound effects or music
            //BooleanButton sfxButton = new BooleanButton("Sound Effects", true);
            //sfxButton.Tapped += sfxButton_Tapped;
            //MenuButtons.Add(sfxButton);

            Button musicButton = new Button("Help");
            musicButton.Tapped += musicButton_Tapped;
            MenuButtons.Add(musicButton);
        }
        /// <summary>
        /// Constructor lets the caller specify whether to include the standard
        /// "A=ok, B=cancel" usage text prompt.
        /// </summary>
        public MessageBoxScreen(string message, bool includeUsageText)
        {
            const string usageText = "\nA button, Space, Enter = ok" +
                                     "\nB button, Esc = cancel";

            if (includeUsageText)
                this.message = message + usageText;
            else
                this.message = message;

            IsPopup = true;

            TransitionOnTime = TimeSpan.FromSeconds(0.2);
            TransitionOffTime = TimeSpan.FromSeconds(0.2);

            againButton = new Button("OK");
            againButton.Tapped += new EventHandler<EventArgs>(againButton_Tapped);

            EnabledGestures = GestureType.Tap;
        }