/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here base.Initialize(); tilesize = 25; selectionMenu = new SelectionButton[4]; yellowexampleTexture = new Texture2D(GraphicsDevice, 1, 1); blueexampleTexture = new Texture2D(GraphicsDevice, 1, 1); greenexampleTexture = new Texture2D(GraphicsDevice, 1, 1); purpleexampleTexture = new Texture2D(GraphicsDevice, 1, 1); yellowexampleTexture.SetData<Color>(new Color[] { Color.Yellow }); blueexampleTexture.SetData<Color>(new Color[] { Color.Blue }); greenexampleTexture.SetData<Color>(new Color[] { Color.Green }); purpleexampleTexture.SetData<Color>(new Color[] { Color.Purple }); for (int i = 0; i<selectionMenu.Length; i++) { selectionMenu[i] = new SelectionButton(100 + (50 * i)); } selectionMenu[0].tileskin = yellowexampleTexture; selectionMenu[1].tileskin = blueexampleTexture; selectionMenu[2].tileskin = greenexampleTexture; selectionMenu[3].tileskin = purpleexampleTexture; currentTexture = selectionMenu[0].tileskin; }