Beispiel #1
0
        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();
        }
Beispiel #2
0
        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();
        }