} /* unload_content() */ /*********************************************************** * * Method: * resize_window * * Description: * Resets the scale for the game. * ***********************************************************/ public void resize_window(object sender, EventArgs e) { graphics.PreferredBackBufferWidth = game.Window.ClientBounds.Width; graphics.PreferredBackBufferHeight = game.Window.ClientBounds.Height; ViewDims.set_window_size(new Rectangle(0, 0, game.Window.ClientBounds.Width, game.Window.ClientBounds.Height)); } /* resize_window() */
} /* draw() */ /*********************************************************** * * Method: * construct * * Description: * Initialize the game. * ***********************************************************/ public void construct(Game g) { game = g; graphics = new GraphicsDeviceManager(game); game.Content.RootDirectory = "Content"; game.Window.AllowUserResizing = true; game.Window.ClientSizeChanged += resize_window; ViewDims.set_window_size(new Rectangle(0, 0, game.Window.ClientBounds.Width, game.Window.ClientBounds.Height)); } /* construct() */