Beispiel #1
0
        public GameplayMenu(ContentManager content)
        {
            m_page           = 0;
            m_maxPages       = 0;
            m_numberOfTowers = 0;

            // A page consists of 5 tower buttons
            m_minIndex = m_page * 5;
            m_maxIndex = m_minIndex + 5;

            m_towerOptions = new List <TowerButton>();

            // Create the wave bar
            m_spawnBarTex = content.Load <Texture2D>("Art\\PlaceholderArt\\GameplayGUI\\WaveBar");
            m_spawnBarPos = new Vector2(828, 874);
            m_spawnBarSrc = new Rectangle(0, 0, m_spawnBarTex.Width, m_spawnBarTex.Height);

            // Set up the main tower menu.
            m_menu = new FreeFormMenu(content, "Art\\GameArt\\GameplayGUI\\TowerBar\\GameplayButton", false, new Vector2[] { new Vector2(72, 1044), new Vector2(864, 936), new Vector2(180, 936) });
            m_menu.Buttons[0].Ttip = new ToolTip(content.Load <Texture2D>("Art\\GameArt\\ToolTipBacking"), Game1.debugFont, new Vector2(0, 0), Color.White, Color.Black, Vector2.Zero, "Construct a new tower.");
            m_menu.Buttons[1].Ttip = new ToolTip(content.Load <Texture2D>("Art\\GameArt\\ToolTipBacking"), Game1.debugFont, new Vector2(0, 0), Color.White, Color.Black, Vector2.Zero, "Next Page");
            m_menu.Buttons[2].Ttip = new ToolTip(content.Load <Texture2D>("Art\\GameArt\\ToolTipBacking"), Game1.debugFont, new Vector2(0, 0), Color.White, Color.Black, Vector2.Zero, "Previous Page");
            m_selectionBorder      = new CenteredStaticGraphic(content.Load <Texture2D>("Art\\PlaceholderArt\\GameplayGUI\\TowersBorder"), new Vector2(522, 1008), Color.White, 1);
            m_menuBackground       = new CenteredStaticGraphic(content.Load <Texture2D>("Art\\PlaceholderArt\\GameplayGUI\\MenuBackground"), new Vector2(960, 976), Color.White, 1);
        }
        public SettingsMenu(ContentManager content)
        {
            m_menu       = new NormalMenu(content, "Art\\GameArt\\MenuGUI\\SettingsMenu\\MenuButton", false, false, 2, 200, new Vector2(960, 300));
            m_volumeMenu = new FreeFormMenu(content, "Art\\GameArt\\MenuGUI\\SettingsMenu\\VolumeButton", false, new Vector2[] { new Vector2(816, 400), new Vector2(1104, 400) });

            m_backing = new CenteredStaticGraphic(content.Load <Texture2D>("Art\\GameArt\\MenuGUI\\SettingsMenu\\VolumePercentBacking"), new Vector2(960, 400), Color.White, 1);
        }