Microsoft.Xna.Framework.Input
Class MouseState

java.lang.Object
  extended by System.ValueType
      extended by Microsoft.Xna.Framework.Input.MouseState

public final class MouseState
extends ValueType

Represents the state of a mouse input device, including mouse cursor position and buttons pressed.

Author:
Halofreak1990

Field Summary
 ButtonState LeftButton
          Returns the state of the left mouse button.
 ButtonState MiddleButton
          Returns the state of the middle mouse button.
 ButtonState RightButton
          Returns the state of the right mouse button.
 int ScrollWheelValue
          Gets the cumulative mouse scroll wheel value since the game was started.
 int X
          Specifies the horizontal position of the mouse cursor.
 ButtonState XButton1
          Returns the state of XBUTTON1.
 ButtonState XButton2
          Returns the state of XBUTTON2.
 int Y
          Specifies the vertical position of the mouse cursor.
 
Constructor Summary
MouseState(int x, int y, int scrollWheel, ButtonState leftButton, ButtonState middleButton, ButtonState rightButton, ButtonState xButton1, ButtonState xButton2)
          Initializes a new instance of the MouseState class.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns a value that indicates whether the current instance is equal to a specified object.
 int hashCode()
          Gets the hash code for this instance.
 java.lang.String toString()
          Retrieves a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

X

public final int X
Specifies the horizontal position of the mouse cursor.


Y

public final int Y
Specifies the vertical position of the mouse cursor.


ScrollWheelValue

public final int ScrollWheelValue
Gets the cumulative mouse scroll wheel value since the game was started.


LeftButton

public final ButtonState LeftButton
Returns the state of the left mouse button.


RightButton

public final ButtonState RightButton
Returns the state of the right mouse button.


MiddleButton

public final ButtonState MiddleButton
Returns the state of the middle mouse button.


XButton1

public final ButtonState XButton1
Returns the state of XBUTTON1.


XButton2

public final ButtonState XButton2
Returns the state of XBUTTON2.

Constructor Detail

MouseState

public MouseState(int x,
                  int y,
                  int scrollWheel,
                  ButtonState leftButton,
                  ButtonState middleButton,
                  ButtonState rightButton,
                  ButtonState xButton1,
                  ButtonState xButton2)
Initializes a new instance of the MouseState class.

Parameters:
x - Horizontal mouse position.
y - Vertical mouse position.
scrollWheel - Mouse scroll wheel value.
leftButton - Left mouse button state.
middleButton - Middle mouse button state.
rightButton - Right mouse button state.
xButton1 - XBUTTON1 state.
xButton2 - XBUTTON2 state.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Returns a value that indicates whether the current instance is equal to a specified object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - Object with which to make the comparison.
Returns:
true if the current instance is equal to the specified object; false otherwise.

hashCode

public int hashCode()
Gets the hash code for this instance.

Overrides:
hashCode in class java.lang.Object
Returns:
Hash code for this object.

toString

public java.lang.String toString()
Retrieves a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
String representation of this object.