Example #1
0
 public virtual bool ButtonTriggered(InputButton test, ButtonTrigger trigger = ButtonTrigger.None)
 {
     if (Memory.IsActive)
     {
         if (!bLimitInput || (trigger.HasFlag(ButtonTrigger.Force) ? trigger : (test.Trigger | trigger)).HasFlag(ButtonTrigger.IgnoreDelay))
         {
             if (Keyboard.ButtonTriggered(test, trigger))
             {
                 return(true);
             }
             else if (Mouse.ButtonTriggered(test, trigger))
             {
                 return(true);
             }
             else if (GamePad.ButtonTriggered(test, trigger))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Example #2
0
 public virtual bool ButtonTriggered(InputButton test, ButtonTrigger trigger = ButtonTrigger.None)
 {
     if (Memory.IsActive)
     {
         if (!bLimitInput || ((test.Trigger | trigger) & ButtonTrigger.IgnoreDelay) != 0)
         {
             if (Keyboard.ButtonTriggered(test, trigger))
             {
                 return(true);
             }
             if (Mouse.ButtonTriggered(test, trigger))
             {
                 return(true);
             }
             if (GamePad.ButtonTriggered(test, trigger))
             {
                 return(true);
             }
         }
     }
     return(false);
 }