public void Init(GraphicsDevice gdevice, ContentManager content, IGameState first, object tag) { apptag = tag; GraphicsDevice = gdevice; spritebatch = new SpriteBatch(gdevice); tmgr = new TextureMgr(); tmgr.Init(gdevice, content); //scene = new Scene.Scene(); ChangeState(first); }
protected override void Initialize() { // TODO: Add your initialization logic here base.Initialize(); ui fedit = new ui(this); fedit.OnGraphReszie += (x, y) => { this.graphics.PreferredBackBufferWidth = x; this.graphics.PreferredBackBufferHeight = y; this.graphics.ApplyChanges(); this.GraphicsDevice.Viewport = new Viewport(0, 0, x, y); }; tmgr.Init(GraphicsDevice, Content); System.Windows.Forms.Form form = System.Windows.Forms.Form.FromHandle(this.Window.Handle) as System.Windows.Forms.Form; fedit.Init(form); fedit.Show(); }