MouseState¶
-
struct
MouseState
: System.ValueType Represents a mouse state with cursor position and button press information.
-
readonly int
X
Gets horizontal position of the cursor in relation to the window.
-
readonly int
Y
Gets vertical position of the cursor in relation to the window.
-
readonly Point
Position
Gets cursor position.
-
readonly ButtonState
LeftButton
Gets state of the left mouse button.
-
readonly ButtonState
MiddleButton
Gets state of the middle mouse button.
-
readonly ButtonState
RightButton
Gets state of the right mouse button.
-
readonly int
ScrollWheelValue
Returns cumulative scroll wheel value since the game start.
-
readonly ButtonState
XButton1
Gets state of the XButton1.
-
readonly ButtonState
XButton2
Gets state of the XButton2.
-
bool
op_Equality
(MouseState left, MouseState right) Compares whether two MouseState instances are equal.
Parameters: - left (Microsoft.Xna.Framework.Input.MouseState) – MouseState instance on the left of the equal sign.
- right (Microsoft.Xna.Framework.Input.MouseState) – MouseState instance on the right of the equal sign.
Returns: true if the instances are equal; false otherwise.
-
bool
op_Inequality
(MouseState left, MouseState right) Compares whether two MouseState instances are not equal.
Parameters: - left (Microsoft.Xna.Framework.Input.MouseState) – MouseState instance on the left of the equal sign.
- right (Microsoft.Xna.Framework.Input.MouseState) – MouseState instance on the right of the equal sign.
Returns: true if the objects are not equal; false otherwise.
-
bool
Equals
(System.Object obj) Compares whether current instance is equal to specified object.
Parameters: - obj (System.Object) – The MouseState to compare.
Returns:
-
int
GetHashCode
() Gets the hash code for MouseState instance.
Returns: Hash code of the object.
-
void
set_X
(int value) Parameters: - value (int) –
-
void
set_Y
(int value) Parameters: - value (int) –
-
void
set_LeftButton
(ButtonState value) Parameters: - value (Microsoft.Xna.Framework.Input.ButtonState) –
-
void
set_MiddleButton
(ButtonState value) Parameters: - value (Microsoft.Xna.Framework.Input.ButtonState) –
-
void
set_RightButton
(ButtonState value) Parameters: - value (Microsoft.Xna.Framework.Input.ButtonState) –
-
void
set_ScrollWheelValue
(int value) Parameters: - value (int) –
-
void
set_XButton1
(ButtonState value) Parameters: - value (Microsoft.Xna.Framework.Input.ButtonState) –
-
void
set_XButton2
(ButtonState value) Parameters: - value (Microsoft.Xna.Framework.Input.ButtonState) –
-
readonly int