MouseState Members

The following tables list the members exposed by the MouseState type.

Public Properties

Name Description
Public Property LeftButton Returns the state of the left mouse button.
Public Property MiddleButton Returns the state of the middle mouse button.
Public Property RightButton Returns the state of the right mouse button.
Public Property ScrollWheelValue Gets the cumulative mouse scroll wheel value since the game was started.
Public Property X Specifies the horizontal position of the mouse cursor.
Public Property XButton1 Returns the state of XBUTTON1.
Public Property XButton2 Returns the state of XBUTTON2.
Public Property Y Specifies the vertical position of the mouse cursor.

Public Methods

Name Description
Public Method Equals Overloaded. Returns a value that indicates whether the current instance is equal to a specified object.
Public Method GetHashCode Gets the hash code for this instance.
Public Method GetType (Inherited from Object.)
Public Method Static op_Equality Determines whether two MouseState instances are equal.
Public Method Static op_Inequality Determines whether two MouseState instances are not equal.
Public Method ReferenceEquals (Inherited from Object.)
Public Method ToString Retrieves a string representation of this object.

Protected Methods

Name Description
Protected Method Finalize (Inherited from Object.)
Protected Method MemberwiseClone (Inherited from Object.)

See Also

Tasks

How to: Get the Current Mouse Position (Windows)

Concepts

Input Overview

Reference

MouseState Structure
Microsoft.Xna.Framework.Input Namespace