/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); guiBatch = new SpriteBatch(GraphicsDevice); ContentLoader.LoadTextures(Content); ContentLoader.LoadFonts(Content); ContentLoader.LoadShaders(Content); ContentLoader.LoadSounds(Content); debugScreen = new Screen(); fadeTest = new Screen(); guiManager = new GUIManager(); guiManager.LoadScreen("debug_screen", debugScreen); guiManager.LoadScreen("fade_screen", fadeTest); UIButton pcoibutton = new UIButton(new Vector2(0, 50), 20, 20); pcoibutton.ButtonTextBlock.Text = "pcoi"; pcoibutton.MouseClickedEvent += PCOIButtonClick; debugScreen.AddControl(pcoibutton); UIGrid grid = new UIGrid(); UIButton button = new UIButton(new Vector2(200, 200), 200, 200); button.ButtonTextBlock.Text = "Scale Test"; button.ScaleToText = false; grid.AddCell(button, 0.25d, 0.25d, 0.5d, 0.5d); debugScreen.AddControl(grid); UIFPSCounter fpsCounter = new UIFPSCounter(); fpsCounter.HorizontalAlignment = EnumHorizontalAlignment.RIGHT; debugScreen.AddControl(fpsCounter); // TEST SCREEN FOR FADING UIGrid grid2 = new UIGrid(); UIButton button2 = new UIButton(new Vector2(200, 200), 200, 200); button2.ButtonTextBlock.Text = "Faded"; button2.ScaleToText = false; grid2.AddCell(button2, 0.1d, 0.1d, 0.5d, 0.5d); fadeTest.AddControl(grid2); // Set default screen guiManager.SetScreen("debug_screen"); }