/// <summary>
        /// Constructor.
        /// </summary>
        public OptionsMenuScreen()
            : base("Options")
        {
            // Create our menu entries.
            ungulateMenuEntry = new MenuEntry(string.Empty, this);
            languageMenuEntry = new MenuEntry(string.Empty, this);
            frobnicateMenuEntry = new MenuEntry(string.Empty, this);
            elfMenuEntry = new MenuEntry(string.Empty, this);

            SetMenuEntryText();

            MenuEntry back = new MenuEntry("Back", this);

            // Hook up menu event handlers.
            ungulateMenuEntry.Selected += UngulateMenuEntrySelected;
            languageMenuEntry.Selected += LanguageMenuEntrySelected;
            frobnicateMenuEntry.Selected += FrobnicateMenuEntrySelected;
            elfMenuEntry.Selected += ElfMenuEntrySelected;
            back.Selected += OnCancel;

            // Add entries to the menu.
            MenuEntries.Add(ungulateMenuEntry);
            MenuEntries.Add(languageMenuEntry);
            MenuEntries.Add(frobnicateMenuEntry);
            MenuEntries.Add(elfMenuEntry);
            MenuEntries.Add(back);
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        public PauseMenuScreen()
            : base("Paused")
        {
            // Create our menu entries.
            MenuEntry resumeGameMenuEntry = new MenuEntry("Resume Game", this);
            MenuEntry quitGameMenuEntry = new MenuEntry("Quit Game", this);

            // Hook up menu event handlers.
            resumeGameMenuEntry.Selected += OnCancel;
            quitGameMenuEntry.Selected += QuitGameMenuEntrySelected;

            // Add entries to the menu.
            MenuEntries.Add(resumeGameMenuEntry);
            MenuEntries.Add(quitGameMenuEntry);
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        public TowerMenuScreen(td_Tower tower)
            : base(tower.ID)
        {
            this.tower = tower;

            // Create our menu entries.
            MenuEntry upgradeMenuEntry = new MenuEntry("Upgrade", this);
            MenuEntry closeMenuEntry = new MenuEntry("Close", this);

            // Hook up menu event handlers.
            upgradeMenuEntry.Selected += UpgradeMenuEntrySelected;
            closeMenuEntry.Selected += OnCancel;

            // Add entries to the menu.
            MenuEntries.Add(upgradeMenuEntry);
            MenuEntries.Add(closeMenuEntry);
        }
        /// <summary>
        /// Constructor fills in the menu contents.
        /// </summary>
        public MainMenuScreen()
            : base("Ash Ton Of Zombies")
        {
            // Create our menu entries.
            MenuEntry playGameMenuEntry = new MenuEntry("Play Game", this);
            //MenuEntry optionsMenuEntry = new MenuEntry("Options");
            MenuEntry exitMenuEntry = new MenuEntry("Exit", this);

            // Hook up menu event handlers.
            playGameMenuEntry.Selected += PlayGameMenuEntrySelected;
            //optionsMenuEntry.Selected += OptionsMenuEntrySelected;
            exitMenuEntry.Selected += OnCancel;

            // Add entries to the menu.
            MenuEntries.Add(playGameMenuEntry);
            //MenuEntries.Add(optionsMenuEntry);
            MenuEntries.Add(exitMenuEntry);
        }
        /// <summary>
        /// Constructor automatically includes the standard "A=ok, B=cancel"
        /// usage text prompt.
        /// </summary>
        public TowerMenuBoxScreen(td_Tower tower)
        {
            this.tower = tower;

            // Create our menu entries.
            MenuEntry upgradeMenuEntry = new MenuEntry("Upgrade", this);
            MenuEntry closeMenuEntry = new MenuEntry("Close", this);

            // Hook up menu event handlers.
            upgradeMenuEntry.Selected += UpgradeMenuEntrySelected;
            closeMenuEntry.Selected += OnCancel;

            // Add entries to the menu.
            MenuEntries.Add(upgradeMenuEntry);
            MenuEntries.Add(closeMenuEntry);

            //IsPopup = true;

            TransitionOnTime = TimeSpan.FromSeconds(0.2);
            TransitionOffTime = TimeSpan.FromSeconds(0.2);
        }
        /// <summary>
        /// Load graphics content for the game.
        /// </summary>
        public override void LoadContent()
        {
            this.EnabledGestures =
                GestureType.Pinch |
                GestureType.VerticalDrag |
                GestureType.Tap |
                GestureType.HorizontalDrag;

            if (content == null)
                content = new ContentManager(ScreenManager.Game.Services, "Content");

            #region menu assets
            gameFont = content.Load<SpriteFont>("gamefont");
            systemFont = content.Load<SpriteFont>("systemfont");
            tinyFont = content.Load<SpriteFont>("tinyfont");
            menuTexture = new Texture2D(ScreenManager.Game.GraphicsDevice, 5, 5, false, SurfaceFormat.Color); ;

            spriteAtlas = content.Load<Texture2D>("desert_tile");

            dirtTexture = new Texture2D[4];
            dirtTexture[0] = content.Load<Texture2D>("tile_Dirt1");
            dirtTexture[1] = content.Load<Texture2D>("tile_Dirt2");
            dirtTexture[2] = content.Load<Texture2D>("tile_Dirt3");
            dirtTexture[3] = content.Load<Texture2D>("tile_Dirt4");

            muckTexture = new Texture2D[4];
            muckTexture[0] = content.Load<Texture2D>("tile_Muck1");
            muckTexture[1] = content.Load<Texture2D>("tile_Muck2");
            muckTexture[2] = content.Load<Texture2D>("tile_Muck3");
            muckTexture[3] = content.Load<Texture2D>("tile_Muck4");

            sludgeTexture = new Texture2D[4];
            sludgeTexture[0] = content.Load<Texture2D>("tile_Sludge1");
            sludgeTexture[1] = content.Load<Texture2D>("tile_Sludge2");
            sludgeTexture[2] = content.Load<Texture2D>("tile_Sludge3");
            sludgeTexture[3] = content.Load<Texture2D>("tile_Sludge4");

            wallTexture = new Texture2D[4];
            wallTexture[0] = content.Load<Texture2D>("tile_Wall1");
            wallTexture[1] = content.Load<Texture2D>("tile_Wall2");
            wallTexture[2] = content.Load<Texture2D>("tile_Wall3");
            MenuEntry buy_Wall = new MenuEntry("Block - G " + WallEntity.GoldCost + ", E " + WallEntity.EnergyCost, this);
            buy_Wall.Selected += BuyWallMenuEntrySelected;
            buy_Wall.Position = new Vector2(50, 380);
            menuEntries.Add(buy_Wall);

            buildingTexture = content.Load<Texture2D>("tile_Building");
            guyTexture = content.Load<Texture2D>("mob_helper_small");
            MenuEntry buy_Building = new MenuEntry("Energy - G " + BuildingEntity.GoldCost + ", E " + BuildingEntity.EnergyCost, this);
            buy_Building.Selected += BuyBuildingMenuEntrySelected;
            buy_Building.Position = new Vector2(50, 420);
            menuEntries.Add(buy_Building);

            towerTexture = content.Load<Texture2D>("tile_Tower");
            bulletTexture = content.Load<Texture2D>("mob_Bullet_Red_0");
            MenuEntry buy_Tower = new MenuEntry("Shoot - G " + TowerEntity.GoldCost + ", E " + TowerEntity.EnergyCost, this);
            buy_Tower.Selected += BuyTowerMenuEntrySelected;
            buy_Tower.Position = new Vector2(50, 460);
            menuEntries.Add(buy_Tower);

            towerLaserTexture = content.Load<Texture2D>("tile_Tower_Laser");
            MenuEntry buy_TowerLaser = new MenuEntry("Zap - G " + TowerLaserEntity.GoldCost + ", E " + TowerLaserEntity.EnergyCost, this);
            buy_TowerLaser.Selected += BuyTowerLaserMenuEntrySelected;
            buy_TowerLaser.Position = new Vector2(300, 420);
            menuEntries.Add(buy_TowerLaser);

            towerLavaTexture = content.Load<Texture2D>("tile_Tower_Lava");
            lavaTexture = content.Load<Texture2D>("mob_Lava");
            MenuEntry buy_TowerLava = new MenuEntry("Burn - G " + TowerLavaEntity.GoldCost + ", E " + TowerLavaEntity.EnergyCost, this);
            buy_TowerLava.Selected += BuyTowerLavaMenuEntrySelected;
            buy_TowerLava.Position = new Vector2(300, 460);
            menuEntries.Add(buy_TowerLava);

            zombieTexture = content.Load<Texture2D>("mob_Zombie");
            hardZombieTexture = content.Load<Texture2D>("mob_HardZombie");
            dollZombieTexture = content.Load<Texture2D>("mob_ZombieDoll");

            Color[] color = new Color[25];
            for (int i = 0; i < color.Length; i++)
            {
                color[i] = Color.Black;
            }
            menuTexture.SetData(color);
            #endregion

            Tile_Engine.Content = ScreenManager.Content;
            Tile_Engine.Map = BuildEmptyMap(16, 7);
            Tile_Engine.Zoom = 1.0f;
            //Tile_Engine.Viewport = this.game.GraphicsDevice.Viewport;
            Tile_Engine.Viewport = new Viewport(0, 0,
                this.game.GraphicsDevice.Viewport.Width,
                this.game.GraphicsDevice.Viewport.Height - 130);

            // once the load has finished, we use ResetElapsedTime to tell the game's
            // timing mechanism that we have just finished a very long frame, and that
            // it should not try to catch up.
            ScreenManager.Game.ResetElapsedTime();
        }