public cMenuOptionsWindowButton(GraphicsDeviceManager gd, ContentManager cm)
        {
            _instance = this;
            _graphics = gd;
            _contentManager = cm;
            mouseState = new MouseState();
            _tabFont = cFontManager.Instance.getFont("Treb8");
            _optionsbuttons = new List<cMenuButton>();

            cSpriteManager.Instance.addTexture("Resources/Menu/optionswindowtab", "controls_tab");
            _tcontrolsTab = new cMenuButton("controls_tab");
            _tcontrolsTab.setOnClickListener(this);
            _tcontrolsTab.Position = new Vector2(800 / 5 + 62, 600 / 2 - 157);
            _optionsbuttons.Add(_tcontrolsTab);
            cSpriteManager.Instance.addTexture("Resources/Menu/optionswindowtab", "sound_tab");
            _tsoundTab = new cMenuButton("sound_tab");
            _tsoundTab.setOnClickListener(this);
            _tsoundTab.Position = new Vector2(800 / 5 + 132, 600 / 2 - 157);
            _optionsbuttons.Add(_tsoundTab);
            cSpriteManager.Instance.addTexture("Resources/Menu/optionswindowtab", "display_tab");
            _tdisplayTab = new cMenuButton("display_tab");
            _tdisplayTab.setOnClickListener(this);
            _tdisplayTab.Position = new Vector2(800 / 5 + 202, 600 / 2 - 157);
            _optionsbuttons.Add(_tdisplayTab);
            cSpriteManager.Instance.addTexture("Resources/Menu/optionswindowtab", "cancel_button");
            _tcancelButton = new cMenuButton("cancel_button");
            _tcancelButton.setOnClickListener(this);
            _tcancelButton.Position = new Vector2(_screenWidth - 231, _screenHeight / 2 + 183);
            _optionsbuttons.Add(_tcancelButton);
        }
Пример #2
0
        public cMenuWindowButton(GraphicsDeviceManager gd, ContentManager cm)
        {
            _instance = this;
            _graphics = gd;
            _contentManager = cm;
            mouseState = new MouseState();
            _tabFont = cFontManager.Instance.getFont("Treb8");
            _aLevel = new string[6];
            _aLevel[0] = "Training";
            _aLevel[1] = "level flame";
            _aLevel[2] = "level platforms";
            _aLevel[3] = "Training";
            _aLevel[4] = "Training";
            _aLevel[5] = "Training";
            _quickgamebuttons = new List<cMenuButton>();

            cSpriteManager.Instance.addTexture("Resources/Menu/button2", "button1");
            _tButton1 = new cMenuButton("button1");
            _tButton1.setOnClickListener(this);
            _tButton1.Position = new Vector2(_screenWidth - 231, _screenHeight / 2 + 115);
            _quickgamebuttons.Add(_tButton1);
            cSpriteManager.Instance.addTexture("Resources/Menu/button2", "button2");
            _tButton2 = new cMenuButton("button2");
            _tButton2.setOnClickListener(this);
            _tButton2.Position = new Vector2(_screenWidth - 231, _screenHeight / 2 + 115);
            _quickgamebuttons.Add(_tButton2);
            cSpriteManager.Instance.addTexture("Resources/Menu/button2", "button3");
            _tButton3 = new cMenuButton("button3");
            _tButton3.setOnClickListener(this);
            _tButton3.Position = new Vector2(_screenWidth - 231, _screenHeight / 2 + 115);
            _quickgamebuttons.Add(_tButton3);
            cSpriteManager.Instance.addTexture("Resources/Menu/button1", "nextbutton");
            _tButton4 = new cMenuButton("nextbutton");
            _tButton4.setOnClickListener(this);
            _tButton4.Position = new Vector2(_screenWidth - 120, _screenHeight / 2 + 64);
            _quickgamebuttons.Add(_tButton4);
            cSpriteManager.Instance.addTexture("Resources/Menu/button2", "button5");
            _tButton5 = new cMenuButton("button5");
            _tButton5.setOnClickListener(this);
            _tButton5.Position = new Vector2(_screenWidth - 231, _screenHeight / 2 + 115);
            _quickgamebuttons.Add(_tButton5);
            cSpriteManager.Instance.addTexture("Resources/Menu/button2", "button6");
            _tButton6 = new cMenuButton("button6");
            _tButton6.setOnClickListener(this);
            _tButton6.Position = new Vector2(_screenWidth - 231, _screenHeight / 2 + 115);
            _quickgamebuttons.Add(_tButton6);
            cSpriteManager.Instance.addTexture("Resources/Menu/button2", "button7");
            _tButton7 = new cMenuButton("button7");
            _tButton7.setOnClickListener(this);
            _tButton7.Position = new Vector2(_screenWidth - 231, _screenHeight / 2 + 115);
            _quickgamebuttons.Add(_tButton7);
            cSpriteManager.Instance.addTexture("Resources/Menu/button1", "previousbutton");
            _tButton8 = new cMenuButton("previousbutton");
            _tButton8.setOnClickListener(this);
            _tButton8.Position = new Vector2(478 / 2 - 35, _screenHeight / 2 + 64);
            _quickgamebuttons.Add(_tButton8);
            cSpriteManager.Instance.addTexture("Resources/Menu/button1", "cancelbutton");
            _tButton9 = new cMenuButton("cancelbutton");
            _tButton9.setOnClickListener(this);
            _tButton9.Position = new Vector2(_screenWidth - 120, _screenHeight / 2 + 115);
            _quickgamebuttons.Add(_tButton9);
        }
Пример #3
0
        /// <summary>
        /// Load graphics 
        /// </summary>
        /// <param name="gd">the graphics device</param>
        private void LoadGraphicsContent()
        {
            GraphicsDevice gd = _graphics.GraphicsDevice;

            Color c = new Color(17, 194, 253);

            cSpriteManager.Instance.addTexture("Resources/Menu/PortalLogoHiRes", "portal_logo");
            _tPortalLogo = new cSprite("portal_logo");

            cSpriteManager.Instance.addTexture("Resources/Menu/textnewgame", "new_game");
            _tNewGame = new cMenuButton("new_game");
            _tNewGame.setHoverOverColor(c);
            _tNewGame.setOnClickListener(this);
            _tNewGame.Position = new Vector2(800 / 5 - 73, 600 / 2+39);
            _buttons.Add(_tNewGame);

            cSpriteManager.Instance.addTexture("Resources/Menu/textcontinue", "continue");
            _tContinue = new cMenuButton("continue");
            _tContinue.setHoverOverColor(c);
            _tContinue.setOnClickListener(this);
            _tContinue.Position = new Vector2(800 / 5 - 73, 600 / 2 + 59);
            _buttons.Add(_tContinue);

            cSpriteManager.Instance.addTexture("Resources/Menu/textquickgame", "quick_game");
            _tQuickGame = new cMenuButton("quick_game");
            _tQuickGame.setHoverOverColor(c);
            _tQuickGame.setOnClickListener(this);
            _tQuickGame.Position = new Vector2(800 / 5 - 73, 600 / 2 + 79);
            _buttons.Add(_tQuickGame);

            cSpriteManager.Instance.addTexture("Resources/Menu/textoptions", "options");
            _tOptions = new cMenuButton("options");
            _tOptions.setHoverOverColor(c);
            _tOptions.setOnClickListener(this);
            _tOptions.Position = new Vector2(800 / 5 - 73, 600 / 2 + 99);
            _buttons.Add(_tOptions);

            cSpriteManager.Instance.addTexture("Resources/Menu/textquit", "quit");
            _tQuit = new cMenuButton("quit");
            _tQuit.setHoverOverColor(c);
            _tQuit.setOnClickListener(this);
            _tQuit.Position = new Vector2(800 / 5 - 73, 600 / 2 + 119);
            _buttons.Add(_tQuit);

            cSpriteManager.Instance.addTexture("Resources/Menu/half-life2_pointer", "mouse_pointer");
            _tMousePointer = new cSprite("mouse_pointer");
        }