Пример #1
0
 /// <summary>
 /// Gets if the mouse button was released in this frame.
 /// </summary>
 /// <param name="b">The MouseButton to check.</param>
 /// <returns>`true` if the mouse button was released, `false` otherwise.</returns>
 public bool IsButtonReleased(MouseButton b)
 {
     return b.GetMappedState(CurrentMouseState) == ButtonState.Released && b.GetMappedState(PreviousMouseState) == ButtonState.Pressed;
 }
Пример #2
0
 /// <summary>
 /// Gets if the mouse button is up.
 /// </summary>
 /// <param name="b">The MouseButton to check.</param>
 /// <returns>`true` if the mouse button is up, `false` otherwise.</returns>
 public bool IsButtonUp(MouseButton b)
 {
     return b.GetMappedState(CurrentMouseState) == ButtonState.Released;
 }
Пример #3
0
 /// <summary>
 /// Gets if the mouse button was up in the previous frame.
 /// </summary>
 /// <param name="b">The MouseButton to check.</param>
 /// <returns>`true` if the mouse button was up, `false` otherwise.</returns>
 public bool IsButtonPreviouslyUp(MouseButton b)
 {
     return b.GetMappedState(PreviousMouseState) == ButtonState.Released;
 }
Пример #4
0
 /// <summary>
 /// Gets if the mouse button was down in the previous frame.
 /// </summary>
 /// <param name="b">The MouseButton to check.</param>
 /// <returns>`true` if the mouse button was down, `false` otherwise.</returns>
 public bool IsButtonPreviouslyDown(MouseButton b)
 {
     return b.GetMappedState(PreviousMouseState) == ButtonState.Pressed;
 }
Пример #5
0
 /// <summary>
 /// Gets if the mouse button is down.
 /// </summary>
 /// <param name="b">The MouseButton to check.</param>
 /// <returns>`true` if the mouse button is down, `false` otherwise.</returns>
 public bool IsButtonDown(MouseButton b)
 {
     return b.GetMappedState(CurrentMouseState) == ButtonState.Pressed;
 }
Пример #6
0
 /// <summary>
 /// Gets the state for the passed mouse button in the last frame.
 /// </summary>
 /// <param name="b">The mouse button to check.</param>
 /// <returns>The ButtonState for the mouse in the last frame.</returns>
 public ButtonState GetPreviousButtonState(MouseButton b)
 {
     return b.GetMappedState(PreviousMouseState);
 }
Пример #7
0
 /// <summary>
 /// Gets the state for the passed mouse button.
 /// </summary>
 /// <param name="b">The mouse button to check.</param>
 /// <returns>The ButtonState for the mouse in this frame.</returns>
 public ButtonState GetButtonState(MouseButton b)
 {
     return b.GetMappedState(CurrentMouseState);
 }