public static void TestRenderWindow001() { TestXNAGame game = null; GuiWindow control = null; DrawEventArgs e = new DrawEventArgs(); TestXNAGame.Start("GuiWindow.TestRenderWindow001", delegate { game = TestXNAGame.Instance; game.Mouse.CursorEnabled = true; //main.XNAGame.Graphics.ToggleFullScreen(); control = new GuiWindow(); control.tex = Texture2D.FromFile(game.GraphicsDevice, game.EngineFiles.GuiDefaultSkin.GetFullFilename()); control.tileSet = new TileSet(228, 150, new int[] { 52, 415, 80 }, new int[] { 76, 291, 49 }); control.Position = new Vector2(50, 50); control.Size = new Vector2(700, 500); control.BackgroundColor = Color.Red; control.Load(game.GraphicsDevice); control.Service = game.GuiService; game.GuiService.TopLevelControls.Add(control); }, delegate { //e.Device = main.XNAGame.GraphicsDevice; //e.SpriteBatch = main.SpriteBatch; //e.TempCreateGraphics(); //control.Graphics = e.Graphics; //e.SpriteBatch.Begin(); //control.Invalidate(); //control.Draw( e ); //e.SpriteBatch.End(); }); }
/// <summary> /// Test empty game /// </summary> public static void TestEmptyGame() { TestXNAGame.Start(null); }