Beispiel #1
0
 /// <summary>
 /// Gets whether a button was down at the time of the previous flush.
 /// </summary>
 /// <param name="mouseButton">Button to check.</param>
 /// <returns>True if the button was down at the time of the previous flush, false otherwise.</returns>
 public bool WasDown(MouseButton mouseButton)
 {
     return(previousDownedButtons.Contains(mouseButton));
 }
Beispiel #2
0
 /// <summary>
 /// Gets whether a down event occurred at any point between the previous flush and up to the last event process call for a button that was not down in the previous flush.
 /// </summary>
 /// <param name="button">Button to check.</param>
 /// <returns>True if the button was pressed in the latest event processing call, false otherwise.</returns>
 public bool WasPushed(MouseButton button)
 {
     return(!previousDownedButtons.Contains(button) && anyDownedButtons.Contains(button));
 }
Beispiel #3
0
 /// <summary>
 /// Gets whether a button is currently pressed according to the latest event processing call.
 /// </summary>
 /// <param name="button">Button to check.</param>
 /// <returns>True if the button was pressed in the latest event processing call, false otherwise.</returns>
 public bool IsDown(MouseButton button)
 {
     return(downedButtons.Contains(button));
 }