public final class MouseState extends ValueType implements IEquatable<MouseState>
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
Equals(MouseState other)
Indicates whether the current object is equal to another object of the same type.
|
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.
|
public final int X
public final int Y
public final int ScrollWheelValue
public final ButtonState LeftButton
public final ButtonState RightButton
public final ButtonState MiddleButton
public final ButtonState XButton1
public final ButtonState XButton2
public MouseState(int x, int y, int scrollWheel, ButtonState leftButton, ButtonState middleButton, ButtonState rightButton, ButtonState xButton1, ButtonState xButton2)
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.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Object with which to make the comparison.public boolean Equals(MouseState other)
IEquatable
Equals
in interface IEquatable<MouseState>
other
- An object to compare with this object.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object