public void WhenIPressAButton(UserInterfaceAction input, int times) { for (int i = 0; i < times; i++) { WhenIPressAButton(input); } }
/// <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); }
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); } } }
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); } } }
public void SendButtonPress(UserInterfaceAction btn) { context.Desktop.OnUserInterfaceAction(new UserInterfaceActionEventArgs(btn)); context.WaitForAnimations(); }
private void OnButtonPress(UserInterfaceAction btn) { }
public void WhenIPressAButton(UserInterfaceAction input) { instructor.SendButtonPress(input); }
public UserInterfaceActionEventArgs(UserInterfaceAction action) { Reset(action); }