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 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");
        }