예제 #1
0
 public void WhenIPressAButton(UserInterfaceAction input, int times)
 {
     for (int i = 0; i < times; i++)
     {
         WhenIPressAButton(input);
     }
 }
예제 #2
0
        /// <summary>
        /// Resets this event argument structure to handle a new event type.
        /// This method returns the object it is called on.
        /// </summary>
        /// <param name="action"></param>
        public UserInterfaceActionEventArgs Reset(UserInterfaceAction action)
        {
            this.Action = action;
            Handled     = false;

            return(this);
        }
예제 #3
0
        public void UpdateGamePadButtonState(Buttons button, UserInterfaceAction action, bool value)
        {
            if (value)
            {
                if (!ignoredButtons.Contains(button))
                {
                    pressedButtons.Add(button);
                    pressedActions.Add(action);
                }
            }
            if (!value)
            {
                ignoredButtons.Remove(button);

                if (pressedButtons.Contains(button))
                {
                    pressedButtons.Remove(button);
                    pressedActions.Remove(action);
                    releasedActions.Add(action);
                }
            }
        }
예제 #4
0
        public void UpdateKeyState(Keys key, UserInterfaceAction action, bool value)
        {
            if (value)
            {
                if (!ignoredKeys.Contains(key))
                {
                    pressedKeys.Add(key);
                    pressedActions.Add(action);
                }
            }
            if (!value)
            {
                ignoredKeys.Remove(key);

                if (pressedKeys.Contains(key))
                {
                    pressedKeys.Remove(key);

                    pressedActions.Remove(action);
                    releasedActions.Add(action);
                }
            }
        }
예제 #5
0
        public void SendButtonPress(UserInterfaceAction btn)
        {
            context.Desktop.OnUserInterfaceAction(new UserInterfaceActionEventArgs(btn));

            context.WaitForAnimations();
        }
예제 #6
0
 private void OnButtonPress(UserInterfaceAction btn)
 {
 }
예제 #7
0
 public void WhenIPressAButton(UserInterfaceAction input)
 {
     instructor.SendButtonPress(input);
 }
예제 #8
0
 public UserInterfaceActionEventArgs(UserInterfaceAction action)
 {
     Reset(action);
 }