示例#1
0
 public override void OnActivated(UIApplication application)
 {
     if (MonoGameGame != null)
     {
         MonoGameGame.IsActive = true;
     }
     TouchPanel.Reset();
 }
示例#2
0
        public override void BeforeInitialize()
        {
            base.BeforeInitialize();
            _viewController.View.MakeCurrent();
            TouchPanel.Reset();

            // HACK: Because GraphicsDevice doesn't know anything, we need to
            //       tell it the current viewport size.  Once GraphicsDevice is
            //       capable of querying PresentationParameters
            //       DeviceWindowHandle for the size, this will no longer be
            //       needed.
            var gds = (IGraphicsDeviceService)Game.Services.GetService(typeof(IGraphicsDeviceService));

            if (gds != null && gds.GraphicsDevice != null)
            {
                gds.GraphicsDevice.Viewport = new Viewport(0, 0, Window.ClientBounds.Width, Window.ClientBounds.Height);
            }
        }
示例#3
0
 public override void OnActivated(UIApplication application)
 {
     TouchPanel.Reset();
 }
示例#4
0
        public override void ResetController()
        {
#if IPHONE
            TouchPanel.Reset();
#endif
        }
示例#5
0
 private void Application_DidBecomeActive(NSNotification notification)
 {
     IsActive = true;
     TouchPanel.Reset();
 }