Exemplo n.º 1
0
 public override void PressesBegan(NSSet <UIPress> presses, UIPressesEvent evt)
 {
     if (presses.Count == 0)
     {
         return;
     }
     foreach (UIPress press in presses)
     {
         if (press.Type == UIPressType.Menu)
         {
             if (platformBackButton == null)
             {
                 platformBackButton = _platform.Game.Services.GetService <IPlatformBackButton>();
             }
             if (platformBackButton != null)
             {
                 if (!platformBackButton.Handled())
                 {
                     ControllerUserInteractionEnabled = true;
                 }
                 else
                 {
                     Microsoft.Xna.Framework.Input.GamePad.MenuPressed = true;
                 }
             }
             else
             {
                 ControllerUserInteractionEnabled = true;
             }
         }
     }
     if (ControllerUserInteractionEnabled)
     {
         base.PressesBegan(presses, evt);
     }
 }
Exemplo n.º 2
0
 public override void PressesBegan(NSSet<UIPress> presses, UIPressesEvent evt)
 {
     if (presses.Count == 0)
         return;
     foreach (UIPress press in presses)
     {
         if (press.Type == UIPressType.Menu)
         {
             if (platformBackButton == null)
                 platformBackButton = _platform.Game.Services.GetService<IPlatformBackButton>();
             if (platformBackButton != null)
             {
                 if (!platformBackButton.Handled())
                 {
                     ControllerUserInteractionEnabled = true;
                 }
                 else
                 {
                     Microsoft.Xna.Framework.Input.GamePad.MenuPressed = true;
                 }
             }
             else
             {
                 ControllerUserInteractionEnabled = true;
             }
         }
     }
     if (ControllerUserInteractionEnabled)
         base.PressesBegan(presses, evt);
 }