MouseState Constructor

Initializes a new instance of the MouseState class.

Syntax

'Declaration
Public Sub New ( _
         x As Integer, _
         y As Integer, _
         scrollWheel As Integer, _
         leftButton As ButtonState, _
         middleButton As ButtonState, _
         rightButton As ButtonState, _
         xButton1 As ButtonState, _
         xButton2 As ButtonState _
)
public MouseState (
         int x,
         int y,
         int scrollWheel,
         ButtonState leftButton,
         ButtonState middleButton,
         ButtonState rightButton,
         ButtonState xButton1,
         ButtonState xButton2
)
public:
MouseState(
         int x,
         int y,
         int scrollWheel,
         ButtonState leftButton,
         ButtonState middleButton,
         ButtonState rightButton,
         ButtonState xButton1,
         ButtonState xButton2
)

Parameters

  • x
    Type: Int32
    Horizontal mouse position.
  • y
    Type: Int32
    Vertical mouse position.
  • scrollWheel
    Type: Int32
    Mouse scroll wheel value.
  • leftButton
    Type: ButtonState
    Left mouse button state.
  • middleButton
    Type: ButtonState
    Middle mouse button state.
  • rightButton
    Type: ButtonState
    Right mouse button state.
  • xButton1
    Type: ButtonState
    XBUTTON1 state.
  • xButton2
    Type: ButtonState
    XBUTTON2 state.

Remarks

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

Requirements

Namespace: Microsoft.Xna.Framework.Input

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

See Also

Reference

MouseState Structure
MouseState Members
Microsoft.Xna.Framework.Input Namespace

Platforms

Windows Phone