Ejemplo n.º 1
0
        private void Window_ClientSizeChanged(object sender, EventArgs e)
        {
            if (Window.ClientBounds.Width < 10 || Window.ClientBounds.Height < 10)
            {
                return;
            }

            if (graphics.PreferredBackBufferWidth != Window.ClientBounds.Width ||
                graphics.PreferredBackBufferHeight != Window.ClientBounds.Height)
            {
                graphics.PreferredBackBufferWidth  = Window.ClientBounds.Width;
                graphics.PreferredBackBufferHeight = Window.ClientBounds.Height;

                graphics.ApplyChanges();
                layouter.Resize(Math.Max(404, GraphicsDevice.Viewport.Width), Math.Max(256, GraphicsDevice.Viewport.Height));
            }
        }