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);
        }
Example #2
0
        //public void startMenus()
        //{
        //    _fadeInTimer = 0;
        //    _fadeIntro = true;
        //    _drawOptionsWindow = _drawQuickGameWindow = false;
        //    _globalAlpha = 0;
        //    cCamera.Instance.Position = new Vector2(0, 0);
        //    mouseState = new MouseState();
        //}
        public cMenuWindow(GraphicsDeviceManager gd, ContentManager cm)
        {
            _MenuWindowButton = new cMenuWindowButton(gd, cm);
            _MenuOptionsWindowButton = new cMenuOptionsWindowButton(gd, cm);
            _textParser = new cTextParser();
            //_button = new cMenuButton("Resources/Menu/button");
            _aLevel = new string[6];
            _aLevel[0] = "Training";
            _aLevel[1] = "Training2";
            _aLevel[2] = "Training3";
            //_quickgamebuttons = new List<cMenuButton>();
            //_optionsSelection = new List<cMenuWindow>();

            _titleFont = cFontManager.Instance.getFont("Treb8");
            _mainFont = cFontManager.Instance.getFont("Treb11");

            cSpriteManager.Instance.addTexture("Resources/Menu/quickgamewindow", "quick_game_window");
            _tQuickGameWindow = new cSprite("quick_game_window");
            cSpriteManager.Instance.addTexture("Resources/Menu/quickgamewindow2", "quick_game_window2");
            _tQuickGameWindow2 = new cSprite("quick_game_window2");
            cSpriteManager.Instance.addTexture("Resources/Menu/quickgamehighlight", "quick_game_highlight");
            _tQuickGameHighlight = new cSprite("quick_game_highlight");
            cSpriteManager.Instance.addTexture("Resources/Menu/optionswindow", "options_window");
            _tOptionsWindow = new cSprite("options_window");
            cSpriteManager.Instance.addTexture("Resources/Menu/controlswindow", "controls_window");
            _tControlsWindow = new cSprite("controls_window");
        }
Example #3
0
        public cHUD()
        {
            _instance = this;
            cSpriteManager.Instance.addTexture(@"Resources/HUD/hud_lives", "hud_lives");
            _lives = new cSprite("hud_lives");
            _lives.ScreenFixed = true;
            _lives.Position = new Vector2((_lives.Width / 2) + 16, cCamera.Instance.WidthHeight.Y - (_lives.Height / 2) - 6);
            _font = cFontManager.Instance.getFont("Treb11");

            cSpriteManager.Instance.addTexture(@"Resources/HUD/hudboarder", "hudboarder");
            _hudBoarder = new cSprite("hudboarder");
            _hudBoarder.Position = new Vector2(400, 300);
            _hudBoarder.ScreenFixed = true;
        }
Example #4
0
        public cScene()
        {
            _instance = this;
            _sceneObjects = new List<cGameObject>();
            _shaderObjects = new List<iShaderObject>();
            _bitmapFont = cFontManager.Instance.getFont("Treb11");
            cSpriteManager.Instance.addTexture(@"Resources/HUD/descripwindow", "descripwindow");
            _blankWindow = new cSprite("descripwindow");
            _blankWindow.ScreenFixed = true;
            cSpriteManager.Instance.addTexture("Resources/Menu/half-life2_pointer", "mouse_pointer");
            _mousePointer = new cSprite("mouse_pointer");
            _mousePointer.ScreenFixed = true;
            cSpriteManager.Instance.addTexture("Resources/Menu/button1", "button1");
            _startButton = new cMenuTextButton("button1", "Start");
            _startButton.setHoverOverColor(new Color(17, 194, 253));
            _startButton.setOnClickListener(this);
            _startButton.ScreenFixed = true;

            _continueButton = new cMenuTextButton("button1", "Continue");
            _continueButton.setHoverOverColor(new Color(17, 194, 253));
            _continueButton.setOnClickListener(this);
            _continueButton.ScreenFixed = true;
        }
        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);
        }
Example #6
0
 /// <summary>
 /// Very basic text button alot more could be added to this,
 /// but for now most of the properties such as the font are hard coded in
 /// </summary>
 /// <param name="image"></param>
 /// <param name="text"></param>
 public cMenuTextButton(string image, string text)
     : base(image)
 {
     _text = text;
     _font = cFontManager.Instance.getFont("Treb11");
 }
Example #7
0
 public cTextParser()
 {
     _mainFont = new BitmapFont(@"Resources/Fonts/Treb11.xml");
 }
Example #8
0
        public cMenu(GraphicsDeviceManager gd, ContentManager cm, GameWindow gw)
        {
            _instance = this;
            _graphics = gd;
            _contentManager = cm;
            //_video = new cVideo(gw);

            _screenWidth = (int)cCamera.Instance.Bounds.Y;
            _screenHeight = (int)cCamera.Instance.Bounds.Z;
            _buttons = new List<cMenuButton>();
            _MenuWindow = new cMenuWindow(gd, cm);

            _bitmapFont = cFontManager.Instance.getFont("Treb11");
            //_bitmapFont.Reset(gd.GraphicsDevice);
            LoadGraphicsContent();
        }