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