public override void Initialize() { InitializeScreens(); base.Initialize(); m_virtualScreen = new VirtualScreen(1320, 720, Camera.GraphicsDevice); Game.Window.ClientSizeChanged += Window_ClientSizeChanged; Game.Deactivated += PauseGame; var form = Control.FromHandle(Game.Window.Handle) as Form; if (form != null) { form.MouseCaptureChanged += PauseGame; } Camera.GraphicsDevice.DeviceReset += ReinitializeContent; }
public override void Initialize() { this.InitializeScreens(); base.Initialize(); this.m_virtualScreen = new VirtualScreen(1320, 720, base.Camera.GraphicsDevice); base.Game.Window.ClientSizeChanged += new EventHandler<EventArgs>(this.Window_ClientSizeChanged); base.Game.Deactivated += new EventHandler<EventArgs>(this.PauseGame); Form form = Control.FromHandle(base.Game.Window.Handle) as Form; if (form != null) { form.MouseCaptureChanged += new EventHandler(this.PauseGame); } base.Camera.GraphicsDevice.DeviceReset += new EventHandler<EventArgs>(this.ReinitializeContent); }