MouseState Constructor

Initializes a new instance of the MouseState class.

Namespace: Microsoft.Xna.Framework.Input
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

public MouseState (
         int x,
         int y,
         int scrollWheel,
         ButtonState leftButton,
         ButtonState middleButton,
         ButtonState rightButton,
         ButtonState xButton1,
         ButtonState xButton2
)

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.

Games normally use GetState to get the true mouse state. This constructor is used to instead simulate mouse input for passing within the game's own input subsystem.

Xbox 360, Windows XP SP2, Windows Vista, Zune

Community Additions

ADD
Show: